Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
🐛 Fix register endpoint email bug
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed May 1, 2019
1 parent 1db9b93 commit b2a42ae
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/routes/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ export const routeAuthRegister = async (req: Request, res: Response) => {
delete user.email;
if (user.role == UserRole.ADMIN) delete user.role;
delete user.membershipRole;
if (!req.body.name || !req.body.email)
throw new Error(ErrorCode.MISSING_FIELD);
if (!req.body.name || !email) throw new Error(ErrorCode.MISSING_FIELD);
await register(user, email, req.body.organizationId, req.body.membershipRole);
res.json({ success: true });
};
Expand Down

0 comments on commit b2a42ae

Please sign in to comment.