diff options
Diffstat (limited to 'src/screens/onboarding/ProfileOnboarding.tsx')
-rw-r--r-- | src/screens/onboarding/ProfileOnboarding.tsx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/screens/onboarding/ProfileOnboarding.tsx b/src/screens/onboarding/ProfileOnboarding.tsx index 814cd82e..506d5f63 100644 --- a/src/screens/onboarding/ProfileOnboarding.tsx +++ b/src/screens/onboarding/ProfileOnboarding.tsx @@ -27,6 +27,7 @@ import { genderRegex, } from '../../constants'; import moment from 'moment'; +import AsyncStorage from '@react-native-community/async-storage'; type ProfileOnboardingScreenRouteProp = RouteProp< OnboardingStackParams, @@ -59,6 +60,7 @@ const ProfileOnboarding: React.FC<ProfileOnboardingProps> = ({route}) => { isValidBio: true, isValidGender: true, attemptedSubmit: false, + token: '', }); const [customGender, setCustomGender] = React.useState(); @@ -314,10 +316,12 @@ const ProfileOnboarding: React.FC<ProfileOnboardingProps> = ({route}) => { const endpoint = EDIT_PROFILE_ENDPOINT + `${userId}/`; try { + const token = await AsyncStorage.getItem('token'); let response = await fetch(endpoint, { method: 'PATCH', headers: { 'Content-Type': 'multipart/form-data', + Authorization: 'Token ' + token, }, body: request, }); |