diff options
| -rw-r--r-- | routes/users.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routes/users.ts b/routes/users.ts index e94c7607..2304b17e 100644 --- a/routes/users.ts +++ b/routes/users.ts @@ -240,8 +240,8 @@ export default { if (user.pin === "delete") user.pin = undefined; if (username) { - exists = await db.exists(`user:${username}`); const currentUsername = user.username.replace(/\s/g, "").toLowerCase(); + exists = await db.exists(`user:${currentUsername}`); if (currentUsername !== username && exists) { err("username taken", username, currentUsername); |
