aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2025-09-23 03:26:35 +0000
committerAdam Soltys <[email protected]>2025-09-23 03:26:35 +0000
commitd4ce66326409eff67362bb3592ddc48859627ade (patch)
tree47ff5067906bcaab8e699caf616cbfedaa410c8b
parentaf0f19c261e06f165cb6a24f1a6247e971649d88 (diff)
downloadcoinos-server-d4ce66326409eff67362bb3592ddc48859627ade.tar.gz
coinos-server-d4ce66326409eff67362bb3592ddc48859627ade.zip
fix existence check
-rw-r--r--routes/users.ts2
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);