Separate captcha into the backendInteractor

This commit is contained in:
Ekaterina Vaartis 2018-12-16 20:53:41 +03:00
parent 92de235f4e
commit a525df32c9
4 changed files with 11 additions and 7 deletions

View file

@ -167,6 +167,8 @@ const register = (params) => {
})
}
const getCaptcha = () => fetch('/api/pleroma/captcha').then(resp => resp.json())
const authHeaders = (accessToken) => {
if (accessToken) {
return { 'Authorization': `Bearer ${accessToken}` }
@ -496,6 +498,7 @@ const apiService = {
setUserMute,
fetchMutes,
register,
getCaptcha,
updateAvatar,
updateBg,
updateProfile,