aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/services/UserProfileService.ts4
-rw-r--r--src/store/actions/user.ts4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/services/UserProfileService.ts b/src/services/UserProfileService.ts
index b499829f..e00c0530 100644
--- a/src/services/UserProfileService.ts
+++ b/src/services/UserProfileService.ts
@@ -55,11 +55,11 @@ export const loadProfileInfo = async (token: string, userId: string) => {
export const getProfilePic = async (
token: string,
userId: string,
- type: 'large' | 'small',
+ type: 'profile' | 'header',
) => {
try {
const url =
- type === 'small' ? PROFILE_PHOTO_ENDPOINT : HEADER_PHOTO_ENDPOINT;
+ type === 'profile' ? PROFILE_PHOTO_ENDPOINT : HEADER_PHOTO_ENDPOINT;
const response = await fetch(url + `${userId}/`, {
method: 'GET',
headers: {
diff --git a/src/store/actions/user.ts b/src/store/actions/user.ts
index aae38d94..46f96d9a 100644
--- a/src/store/actions/user.ts
+++ b/src/store/actions/user.ts
@@ -42,8 +42,8 @@ export const loadUserData = (
const token = await getTokenOrLogout(dispatch);
const [profile, avatar, cover] = await Promise.all([
loadProfileInfo(token, user.userId),
- getProfilePic(token, user.userId, 'small'),
- getProfilePic(token, user.userId, 'large'),
+ getProfilePic(token, user.userId, 'profile'),
+ getProfilePic(token, user.userId, 'header'),
]);
dispatch({
type: userDetailsFetched.type,