diff options
| author | Adam Soltys <[email protected]> | 2025-09-23 03:26:35 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-09-23 03:26:35 +0000 |
| commit | d4ce66326409eff67362bb3592ddc48859627ade (patch) | |
| tree | 47ff5067906bcaab8e699caf616cbfedaa410c8b /routes | |
| parent | af0f19c261e06f165cb6a24f1a6247e971649d88 (diff) | |
| download | coinos-server-d4ce66326409eff67362bb3592ddc48859627ade.tar.gz coinos-server-d4ce66326409eff67362bb3592ddc48859627ade.zip | |
fix existence check
Diffstat (limited to 'routes')
| -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); |
