From 7f296fbb38c01e2aa39940280755d301962ee262 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 13 Feb 2025 10:35:23 -0800 Subject: nwc app prefix --- lib/nwc.ts | 4 ++-- lib/register.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/nwc.ts b/lib/nwc.ts index f92017d8..0a41a0e5 100644 --- a/lib/nwc.ts +++ b/lib/nwc.ts @@ -59,8 +59,8 @@ export default () => { if (!methods.includes(method)) return; try { - const app = await g(pubkey); - if (!app) fail(`pubkey not found`); + const app = await g(`app:${pubkey}`); + if (!app) fail("pubkey not found"); const user = await g(`user:${app.uid}`); const result = await handle(method, params, ev, app, user); diff --git a/lib/register.ts b/lib/register.ts index 1493211c..86a816a8 100644 --- a/lib/register.ts +++ b/lib/register.ts @@ -81,7 +81,7 @@ export default async (user, ip) => { name: username, }; - await s(app.pubkey, app); + await s(`app:${app.pubkey}`, app); await db.sAdd(`${id}:apps`, app.pubkey); db.multi() -- cgit v1.2.3