diff options
| author | kaniini <nenolod@gmail.com> | 2018-08-24 18:46:23 +0000 |
|---|---|---|
| committer | kaniini <nenolod@gmail.com> | 2018-08-24 18:46:23 +0000 |
| commit | 14db3f279daed82011bdcc2bbad21450c08a4487 (patch) | |
| tree | 78118003e73a50683903806669a4d4c5f27ea276 /src/services/api/api.service.js | |
| parent | 0429963e63408a207a0c35b33b728acaab1f0d3d (diff) | |
| parent | 0647c1bb720144b3d9e3d7943129d0d67d176ab0 (diff) | |
Merge branch 'feature/who-to-follow-panel-uses-suggestions-api' into 'develop'
Who to follow panel uses suggestions api
See merge request pleroma/pleroma-fe!294
Diffstat (limited to 'src/services/api/api.service.js')
| -rw-r--r-- | src/services/api/api.service.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index 13cc4796..eef0fee9 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -36,6 +36,7 @@ const CHANGE_PASSWORD_URL = '/api/pleroma/change_password' const FOLLOW_REQUESTS_URL = '/api/pleroma/friend_requests' const APPROVE_USER_URL = '/api/pleroma/friendships/approve' const DENY_USER_URL = '/api/pleroma/friendships/deny' +const SUGGESTIONS_URL = '/api/v1/suggestions' import { each, map } from 'lodash' import 'whatwg-fetch' @@ -449,6 +450,12 @@ const fetchMutes = ({credentials}) => { }).then((data) => data.json()) } +const suggestions = ({credentials}) => { + return fetch(SUGGESTIONS_URL, { + headers: authHeaders(credentials) + }).then((data) => data.json()) +} + const apiService = { verifyCredentials, fetchTimeline, @@ -482,7 +489,8 @@ const apiService = { changePassword, fetchFollowRequests, approveUser, - denyUser + denyUser, + suggestions } export default apiService |
