diff options
| author | Adam Soltys <[email protected]> | 2025-04-17 04:29:57 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-04-17 04:30:00 +0000 |
| commit | a7417b11f6b943e2ec0ae849a0ec49345fed87f3 (patch) | |
| tree | c084fefe67bd122a00f029d8133f2a6dc2e1a185 /routes | |
| parent | b07b5ed56a4403cf7d8a0587aba54a342c3b51f7 (diff) | |
| download | coinos-server-a7417b11f6b943e2ec0ae849a0ec49345fed87f3.tar.gz coinos-server-a7417b11f6b943e2ec0ae849a0ec49345fed87f3.zip | |
default username if necessary
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 e12202d8..ff69fbcf 100644 --- a/routes/users.ts +++ b/routes/users.ts @@ -357,7 +357,7 @@ export default { const k0 = await getProfile(key); let username = k0?.name?.replace(/[^a-zA-Z0-9 ]/g, ""); const exists = await getUser(username); - if (exists) username = key.substr(0, 24); + if (!username || exists) username = key.substr(0, 24); user = { username, |
