mirror of
https://github.com/lemeow125/StudE-Frontend.git
synced 2025-06-28 16:25:46 +08:00
Finished up onboarding page
This commit is contained in:
parent
c4e34e7496
commit
b72c8cb236
2 changed files with 37 additions and 20 deletions
|
@ -209,13 +209,13 @@ export async function OnboardingUpdateStudentInfo(info: OnboardingParams) {
|
|||
.patch("/api/v1/accounts/users/me/", info, { headers })
|
||||
.then((response) => {
|
||||
console.log(JSON.stringify(response.data));
|
||||
return response.data;
|
||||
return [true, response.data];
|
||||
})
|
||||
.catch((error) => {
|
||||
let error_message = "";
|
||||
if (error.response) error_message = error.response.data;
|
||||
else error_message = "Unable to reach servers";
|
||||
console.log("Error updating onboarding info", error_message);
|
||||
return false;
|
||||
return [false, error_message];
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue