diff options
| author | eal <eal@waifu.club> | 2018-02-01 18:19:36 +0200 |
|---|---|---|
| committer | eal <eal@waifu.club> | 2018-02-01 18:19:36 +0200 |
| commit | 36e68fba961a46fcd6dda1a57471dcf10775c511 (patch) | |
| tree | 21dd7deace28b33296946714dc1c9561c6b4d30c /src/services/api/api.service.js | |
| parent | 90175a1872cace45ae0e410ed283fab25c9e42cd (diff) | |
| parent | 92289e545a62bd28ea336c5d712a05445e0e20ab (diff) | |
Merge branch 'develop' into feature/normal-emoji-completion
Diffstat (limited to 'src/services/api/api.service.js')
| -rw-r--r-- | src/services/api/api.service.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index 5b078bc8..1f5b3ad2 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -29,6 +29,7 @@ const QVITTER_USER_TIMELINE_URL = '/api/qvitter/statuses/user_timeline.json' const BLOCKING_URL = '/api/blocks/create.json' const UNBLOCKING_URL = '/api/blocks/destroy.json' const USER_URL = '/api/users/show.json' +const FOLLOW_IMPORT_URL = '/api/pleroma/follow_import' import { each, map } from 'lodash' import 'whatwg-fetch' @@ -362,6 +363,15 @@ const uploadMedia = ({formData, credentials}) => { .then((text) => (new DOMParser()).parseFromString(text, 'application/xml')) } +const followImport = ({params, credentials}) => { + return fetch(FOLLOW_IMPORT_URL, { + body: params, + method: 'POST', + headers: authHeaders(credentials) + }) + .then((response) => response.ok) +} + const fetchMutes = ({credentials}) => { const url = '/api/qvitter/mutes.json' @@ -396,7 +406,8 @@ const apiService = { updateBg, updateProfile, updateBanner, - externalProfile + externalProfile, + followImport } export default apiService |
