aboutsummaryrefslogtreecommitdiff
path: root/src/services/api/api.service.js
diff options
context:
space:
mode:
authorshpuld <shp@cock.li>2017-11-17 02:17:47 +0200
committershpuld <shp@cock.li>2017-11-17 02:17:47 +0200
commite13c8c3fd292e5afa43f78bfff9e1bdd754c1df9 (patch)
tree5dc86bd35d39479cf8ab96bfe1379adce033843e /src/services/api/api.service.js
parent44073e72fdb5d253f48b6f0bb0755da89f7e4ae1 (diff)
parent86e685ac3452e42c3276e6ea2d3e7988abf2941a (diff)
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma-fe into feature/custom-theme
Diffstat (limited to 'src/services/api/api.service.js')
-rw-r--r--src/services/api/api.service.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js
index 5abaea7e..5de0a457 100644
--- a/src/services/api/api.service.js
+++ b/src/services/api/api.service.js
@@ -28,7 +28,7 @@ const EXTERNAL_PROFILE_URL = '/api/externalprofile/show.json'
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 USER_URL = '/api/users/show.json'
import { each, map } from 'lodash'
import 'whatwg-fetch'
@@ -202,6 +202,12 @@ const unblockUser = ({id, credentials}) => {
}).then((data) => data.json())
}
+const fetchUser = ({id, credentials}) => {
+ let url = `${USER_URL}?user_id=${id}`
+ return fetch(url, { headers: authHeaders(credentials) })
+ .then((data) => data.json())
+}
+
const fetchFriends = ({id, credentials}) => {
let url = `${FRIENDS_URL}?user_id=${id}`
return fetch(url, { headers: authHeaders(credentials) })
@@ -363,6 +369,7 @@ const apiService = {
unfollowUser,
blockUser,
unblockUser,
+ fetchUser,
favorite,
unfavorite,
retweet,