From 1e81bb51df0a141fabf9984e4cb57cfb161cf9ec Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 10 Mar 2019 18:10:01 +0200 Subject: [PATCH] mastoapi blocks/mutes support. untested. --- src/services/api/api.service.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index 2de87026e6..d755779273 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -18,7 +18,6 @@ const MENTIONS_URL = '/api/statuses/mentions.json' const DM_TIMELINE_URL = '/api/statuses/dm_timeline.json' const FOLLOWERS_URL = '/api/statuses/followers.json' const FRIENDS_URL = '/api/statuses/friends.json' -const BLOCKS_URL = '/api/statuses/blocks.json' const FOLLOWING_URL = '/api/friendships/create.json' const UNFOLLOWING_URL = '/api/friendships/destroy.json' const QVITTER_USER_PREF_URL = '/api/qvitter/set_profile_pref.json' @@ -43,6 +42,8 @@ const DENY_USER_URL = '/api/pleroma/friendships/deny' const SUGGESTIONS_URL = '/api/v1/suggestions' const MASTODON_USER_FAVORITES_TIMELINE_URL = '/api/v1/favourites' +const MASTODON_USER_BLOCKS_URL = '/api/v1/blocks/' +const MASTODON_USER_MUTES_URL = '/api/v1/mutes/' import { each, map } from 'lodash' import { parseStatus, parseUser, parseNotification } from '../entity_normalizer/entity_normalizer.service.js' @@ -522,7 +523,7 @@ const changePassword = ({credentials, password, newPassword, newPasswordConfirma } const fetchMutes = ({credentials}) => { - const url = '/api/qvitter/mutes.json' + const url = MASTODON_USER_MUTES_URL return fetch(url, { headers: authHeaders(credentials) @@ -530,7 +531,7 @@ const fetchMutes = ({credentials}) => { } const fetchBlocks = ({page, credentials}) => { - return fetch(BLOCKS_URL, { + return fetch(MASTODON_USER_BLOCKS_URL, { headers: authHeaders(credentials) }).then((data) => { if (data.ok) {