From 49ed044f5103cf6288fcf5b3ff6d3d720795860c Mon Sep 17 00:00:00 2001 From: Husam Salhab <47015061+hsalhab@users.noreply.github.com> Date: Tue, 22 Dec 2020 11:49:50 -0500 Subject: update endpoints (#143) --- src/services/UserProfileService.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/services') diff --git a/src/services/UserProfileService.ts b/src/services/UserProfileService.ts index 5209aeb7..c67174f9 100644 --- a/src/services/UserProfileService.ts +++ b/src/services/UserProfileService.ts @@ -4,8 +4,8 @@ import {Alert} from 'react-native'; import RNFetchBlob from 'rn-fetch-blob'; import {SocialAccountType} from 'src/types'; import { - AVATAR_PHOTO_ENDPOINT, - COVER_PHOTO_ENDPOINT, + PROFILE_PHOTO_ENDPOINT, + HEADER_PHOTO_ENDPOINT, GET_FB_POSTS_ENDPOINT, GET_IG_POSTS_ENDPOINT, GET_TWITTER_POSTS_ENDPOINT, @@ -46,7 +46,7 @@ export const loadAvatar = async (token: string, userId: string) => { const response = await RNFetchBlob.config({ fileCache: true, appendExt: 'jpg', - }).fetch('GET', AVATAR_PHOTO_ENDPOINT + `${userId}/`, { + }).fetch('GET', PROFILE_PHOTO_ENDPOINT + `${userId}/`, { Authorization: 'Token ' + token, }); const status = response.info().status; @@ -65,7 +65,7 @@ export const loadCover = async (token: string, userId: string) => { let response = await RNFetchBlob.config({ fileCache: true, appendExt: 'jpg', - }).fetch('GET', COVER_PHOTO_ENDPOINT + `${userId}/`, { + }).fetch('GET', HEADER_PHOTO_ENDPOINT + `${userId}/`, { Authorization: 'Token ' + token, }); const status = response.info().status; -- cgit v1.2.3-70-g09d2