diff options
| author | jasper <jasper92341@hotmail.com> | 2019-02-08 13:13:11 -0800 |
|---|---|---|
| committer | jasper <jasper92341@hotmail.com> | 2019-02-08 13:13:11 -0800 |
| commit | 92874b6902ee0d06ac4603c0b6351ccab92c60a5 (patch) | |
| tree | f9319add6c0f22fdca341f87d97b04401a822880 /src/services/api/api.service.js | |
| parent | 70c05a0c085adb95ef9946ac58a461f56252c2c2 (diff) | |
| parent | da0a5535eb09f6637df921a8a5f951c295bedeac (diff) | |
Fxing conflicts
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 d4d52ab1..92daa04e 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -130,7 +130,7 @@ const updateBanner = ({credentials, params}) => { // description const updateProfile = ({credentials, params}) => { // Always include these fields, because they might be empty or false - const fields = ['description', 'locked', 'no_rich_text', 'hide_follows', 'hide_followers'] + const fields = ['description', 'locked', 'no_rich_text', 'hide_follows', 'hide_followers', 'show_role'] let url = PROFILE_UPDATE_URL const form = new FormData() @@ -257,6 +257,13 @@ const fetchFriends = ({id, page, credentials}) => { .then((data) => data.map(parseUser)) } +const exportFriends = ({id, credentials}) => { + let url = `${FRIENDS_URL}?user_id=${id}&export=true` + return fetch(url, { headers: authHeaders(credentials) }) + .then((data) => data.json()) + .then((data) => data.map(parseUser)) +} + const fetchFollowers = ({id, page, credentials}) => { let url = `${FOLLOWERS_URL}?user_id=${id}` if (page) { @@ -536,6 +543,7 @@ const apiService = { fetchConversation, fetchStatus, fetchFriends, + exportFriends, fetchFollowers, followUser, unfollowUser, |
