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 --- routes/users.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'routes') diff --git a/routes/users.ts b/routes/users.ts index 30bd6198..b3137ea8 100644 --- a/routes/users.ts +++ b/routes/users.ts @@ -819,7 +819,7 @@ export default { async app(req, res) { const { pubkey } = req.params; - const app = await g(pubkey); + const app = await g(`app:${pubkey}`); res.send(app); }, @@ -864,7 +864,7 @@ export default { if (app && uid !== app.uid) fail("Unauthorized"); if (secret) pubkey = getPublicKey(secret); app = { ...app, pubkey, max_amount, budget_renewal, name, uid, secret }; - await s(pubkey, app); + await s(`app:${pubkey}`, app); await db.sAdd(`${uid}:apps`, pubkey); res.send({}); } catch (e) { @@ -881,7 +881,7 @@ export default { const app = await g(pubkey); if (app && uid !== app.uid) fail("Unauthorized"); await db.sRem(`${uid}:apps`, pubkey); - await db.del(pubkey); + await db.del(`app:${pubkey}`); res.send({}); } catch (e) { console.log(e); -- cgit v1.2.3