diff options
| author | eal <eal@waifu.club> | 2017-12-23 16:44:22 +0200 |
|---|---|---|
| committer | eal <eal@waifu.club> | 2017-12-23 17:08:45 +0200 |
| commit | a058941aedcfe6a3e14e245b7270477a7a6e69be (patch) | |
| tree | 16be46a71cfed4d9ade235dcc9831361d2f3c113 /src/services/api/api.service.js | |
| parent | 8f3926a096cafb6d61054cb5918cbe7de9f5bf3c (diff) | |
Add follow import to user settings.
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 |
