diff options
Diffstat (limited to 'src/services/UserProfileService.ts')
-rw-r--r-- | src/services/UserProfileService.ts | 8 |
1 files changed, 4 insertions, 4 deletions
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; |