diff options
| author | Adam Soltys <[email protected]> | 2025-02-11 14:29:31 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-02-11 14:29:31 -0800 |
| commit | d4936c18483a7967f2deed3946178ee1e14858f8 (patch) | |
| tree | 5f7f54ebcb9216382fe9ae6afd52f89d7260f57d | |
| parent | de7435e34580e1a9b4b8d95b2a5013112414098f (diff) | |
| download | coinos-server-d4936c18483a7967f2deed3946178ee1e14858f8.tar.gz coinos-server-d4936c18483a7967f2deed3946178ee1e14858f8.zip | |
fix registration
| -rw-r--r-- | lib/register.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/register.ts b/lib/register.ts index e1a39d15..90cfe060 100644 --- a/lib/register.ts +++ b/lib/register.ts @@ -1,6 +1,6 @@ import config from "$config"; import countries from "$lib/countries"; -import { db } from "$lib/db"; +import { db, s } from "$lib/db"; import { l, warn } from "$lib/logging"; import { fail, getUser } from "$lib/utils"; import { bytesToHex, randomBytes } from "@noble/hashes/utils"; @@ -80,10 +80,9 @@ export default async (user, ip) => { }; await s(app.pubkey, app); - await db.sAdd(`${uid}:apps`, app.pubkey); + await db.sAdd(`${id}:apps`, app.pubkey); db.multi() - .set(getPublicKey(user.nwc), user.id) .set(`user:${id}`, JSON.stringify(user)) .set(`user:${username}`, id) .set(`user:${pubkey}`, id) |
