aboutsummaryrefslogtreecommitdiffstats
path: root/routes
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2025-05-12 12:36:28 -0700
committerAdam Soltys <[email protected]>2025-05-12 12:36:28 -0700
commitf85ae08db1dd6471d9e2d5edc28025684d0f3af4 (patch)
tree74bce0b17195b8bda4973e6a203215b1a87cf364 /routes
parent67f9ec53b7348860ab55e49574a81df4706dfb06 (diff)
downloadcoinos-server-f85ae08db1dd6471d9e2d5edc28025684d0f3af4.tar.gz
coinos-server-f85ae08db1dd6471d9e2d5edc28025684d0f3af4.zip
locked balance
Diffstat (limited to 'routes')
-rw-r--r--routes/users.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/routes/users.ts b/routes/users.ts
index ff69fbcf..6b73513b 100644
--- a/routes/users.ts
+++ b/routes/users.ts
@@ -2,7 +2,7 @@ import { createReadStream } from "node:fs";
import { appendFile, unlink } from "node:fs/promises";
import config from "$config";
import { requirePin } from "$lib/auth";
-import { db, g, s } from "$lib/db";
+import { db, g, ga, s } from "$lib/db";
import { err, l, warn } from "$lib/logging";
import { mail, templates } from "$lib/mail";
import { getNostrUser, getProfile, serverPubkey } from "$lib/nostr";
@@ -32,6 +32,7 @@ export default {
const { user } = req;
try {
user.balance = await g(`balance:${user.id}`);
+ user.locked = await ga(`balance:${user.id}`);
user.prompt = !!user.prompt;
if (user.pubkey) user.npub = nip19.npubEncode(user.pubkey);