diff options
| author | Adam Soltys <[email protected]> | 2025-08-10 02:04:00 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-08-10 02:04:05 +0000 |
| commit | 7d914fe065dbe31f22853db2fa3e2a1c8bc1fbd2 (patch) | |
| tree | 66047531689e55915801200c4314aaa9b6790930 | |
| parent | 5ffc5ee98f9850830debf97057574bed79412291 (diff) | |
| download | coinos-server-7d914fe065dbe31f22853db2fa3e2a1c8bc1fbd2.tar.gz coinos-server-7d914fe065dbe31f22853db2fa3e2a1c8bc1fbd2.zip | |
handle user with no pubkey
| -rw-r--r-- | routes/users.ts | 3 |
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); } |
