From d4936c18483a7967f2deed3946178ee1e14858f8 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 11 Feb 2025 14:29:31 -0800 Subject: fix registration --- lib/register.ts | 5 ++--- 1 file 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) -- cgit v1.2.3