aboutsummaryrefslogtreecommitdiffstats
path: root/routes
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2025-08-10 02:04:00 +0000
committerAdam Soltys <[email protected]>2025-08-10 02:04:05 +0000
commit7d914fe065dbe31f22853db2fa3e2a1c8bc1fbd2 (patch)
tree66047531689e55915801200c4314aaa9b6790930 /routes
parent5ffc5ee98f9850830debf97057574bed79412291 (diff)
downloadcoinos-server-7d914fe065dbe31f22853db2fa3e2a1c8bc1fbd2.tar.gz
coinos-server-7d914fe065dbe31f22853db2fa3e2a1c8bc1fbd2.zip
handle user with no pubkey
Diffstat (limited to 'routes')
-rw-r--r--routes/users.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/routes/users.ts b/routes/users.ts
index dc007f05..36f2aab4 100644
--- a/routes/users.ts
+++ b/routes/users.ts
@@ -299,7 +299,7 @@ export default {
user.haspin = !!user.pin;
if (user.destination) user.destination = user.destination.trim();
- await s(`user:${user.pubkey}`, user.id);
+ if (user.pubkey) await s(`user:${user.pubkey}`, user.id);
await s(
`user:${user.username.toLowerCase().replace(/\s/g, "")}`,
user.id,
@@ -311,6 +311,7 @@ export default {
emit(user.id, "user", user);
res.send({ user });
} catch (e) {
+ console.log(e)
warn("failed to update", user.username, e.message);
bail(res, e.message);
}