From fb5ae5bb2e3471df9471cb334e0c31fc6c9dcfcb Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 7 Apr 2025 13:13:36 -0700 Subject: credits --- routes/users.ts | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'routes') diff --git a/routes/users.ts b/routes/users.ts index e26083e3..e12202d8 100644 --- a/routes/users.ts +++ b/routes/users.ts @@ -968,4 +968,12 @@ export default { await db.sRem(`${uid}:pins`, id); res.send({}); }, + + async credits(req, res) { + const { id } = req.user; + const bitcoin = await g(`credit:bitcoin:${id}`); + const lightning = await g(`credit:lightning:${id}`); + const liquid = await g(`credit:liquid:${id}`); + res.send({ bitcoin, lightning, liquid }); + }, }; -- cgit v1.2.3