aboutsummaryrefslogtreecommitdiff
path: root/src/services/api/api.service.js
diff options
context:
space:
mode:
authorHakaba Hitoyo <hakabahitoyo@example.com>2018-08-02 18:34:12 +0900
committerHakaba Hitoyo <hakabahitoyo@example.com>2018-08-02 18:34:12 +0900
commit5900bccff3f09be6bfbfa4a891c91ee043e3a9f0 (patch)
treeb5227876811c1282426c81a598a97283f0b9f042 /src/services/api/api.service.js
parentbcd499c3725d620bc9d4612e04add76cf7a4e395 (diff)
debug
Diffstat (limited to 'src/services/api/api.service.js')
-rw-r--r--src/services/api/api.service.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js
index adf598b7..d07e43c6 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'
@@ -448,6 +449,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,
@@ -481,7 +488,8 @@ const apiService = {
changePassword,
fetchFollowRequests,
approveUser,
- denyUser
+ denyUser,
+ suggestions
}
export default apiService