Skip to content

Commit

Permalink
fix: cleaner fix than the previous one
Browse files Browse the repository at this point in the history
  • Loading branch information
TeddyRoncin committed Sep 13, 2024
1 parent b3f8221 commit fb3a4e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/landing/LoginModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function LoginModal({
};

const signup = async () => {
if (!(await registerUser({ ...signupForm }))) return;
if (!(await registerUser(signupForm))) return;
setPanel('emailSent');
};

Expand Down
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 fb3a4e7

Please sign in to comment.