diff options
| author | tusooa <tusooa@kazv.moe> | 2022-09-20 18:58:32 +0000 |
|---|---|---|
| committer | tusooa <tusooa@kazv.moe> | 2022-09-20 18:58:32 +0000 |
| commit | aa9cae8c716789b9c0952914ecbb42c1d6762b98 (patch) | |
| tree | 6390dedf399a6b786bcf8add8e37f37e6a78aea1 /src/services/api/api.service.js | |
| parent | 74382595af3195e392bbce3f116cbd359b1102d9 (diff) | |
| parent | 3c707608ce828a2221e496df48bd2b3f9aecd5d4 (diff) | |
Merge branch 'add/remove-from-followers' into 'develop'
Added support for removing users from followers
See merge request pleroma/pleroma-fe!1640
Diffstat (limited to 'src/services/api/api.service.js')
| -rw-r--r-- | src/services/api/api.service.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index 841376d1..e692338e 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -67,6 +67,7 @@ const MASTODON_BLOCK_USER_URL = id => `/api/v1/accounts/${id}/block` const MASTODON_UNBLOCK_USER_URL = id => `/api/v1/accounts/${id}/unblock` const MASTODON_MUTE_USER_URL = id => `/api/v1/accounts/${id}/mute` const MASTODON_UNMUTE_USER_URL = id => `/api/v1/accounts/${id}/unmute` +const MASTODON_REMOVE_USER_FROM_FOLLOWERS = id => `/api/v1/accounts/${id}/remove_from_followers` const MASTODON_SUBSCRIBE_USER = id => `/api/v1/pleroma/accounts/${id}/subscribe` const MASTODON_UNSUBSCRIBE_USER = id => `/api/v1/pleroma/accounts/${id}/unsubscribe` const MASTODON_BOOKMARK_STATUS_URL = id => `/api/v1/statuses/${id}/bookmark` @@ -307,6 +308,13 @@ const unblockUser = ({ id, credentials }) => { }).then((data) => data.json()) } +const removeUserFromFollowers = ({ id, credentials }) => { + return fetch(MASTODON_REMOVE_USER_FROM_FOLLOWERS(id), { + headers: authHeaders(credentials), + method: 'POST' + }).then((data) => data.json()) +} + const approveUser = ({ id, credentials }) => { const url = MASTODON_APPROVE_USER_URL(id) return fetch(url, { @@ -1588,6 +1596,7 @@ const apiService = { unmuteConversation, blockUser, unblockUser, + removeUserFromFollowers, fetchUser, fetchUserByName, fetchUserRelationship, |
