Skip to content

Commit

Permalink
fix(server): make sure to lowercase email when updating
Browse files Browse the repository at this point in the history
  • Loading branch information
Miodec committed Sep 1, 2023
1 parent 552e81d commit b9351c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/src/api/controllers/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,9 @@ export async function updateEmail(
req: MonkeyTypes.Request
): Promise<MonkeyResponse> {
const { uid } = req.ctx.decodedToken;
const { newEmail } = req.body;
let { newEmail } = req.body;

newEmail = newEmail.toLowerCase();

try {
await UserDAL.updateEmail(uid, newEmail);
Expand Down

0 comments on commit b9351c6

Please sign in to comment.