Skip to content

Commit

Permalink
fix: fixes (#381)
Browse files Browse the repository at this point in the history
* fix: password confirmation was removed if api did not accept account creation

* fix: cleaner fix than the previous one
  • Loading branch information
TeddyRoncin authored Sep 14, 2024
1 parent 8b26ca2 commit ddb798f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/modules/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ export const registerUser = async (user: RegisterUser) => {
return;
}

delete user.passwordConfirmation;
delete user.legalRepresentativeAccepted;
await API.post('auth/register', user);
await API.post('auth/register', { ...user, passwordConfirmation: undefined, legalRepresentativeAccepted: undefined });
toast.success('Inscription réussie, vérifie tes emails');
return true;
};
Expand Down

0 comments on commit ddb798f

Please sign in to comment.