mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-27 16:24:41 +08:00
fix(server): make sure to lowercase email when updating
This commit is contained in:
parent
552e81d4ca
commit
b9351c6d9d
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue