aboutsummaryrefslogtreecommitdiffstats
path: root/routes
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2025-03-12 15:19:05 -0700
committerAdam Soltys <[email protected]>2025-03-12 15:19:05 -0700
commit48001868b418c500d96801bf31b5f7b5c4f4d79c (patch)
tree041ba62c85df3d251b97db82528c1f6ba4a0fc74 /routes
parent69c2e2c0066304679abacd8314fe4de9dcb71287 (diff)
downloadcoinos-server-48001868b418c500d96801bf31b5f7b5c4f4d79c.tar.gz
coinos-server-48001868b418c500d96801bf31b5f7b5c4f4d79c.zip
opt in nwc notifications
Diffstat (limited to 'routes')
-rw-r--r--routes/users.ts13
1 files changed, 12 insertions, 1 deletions
diff --git a/routes/users.ts b/routes/users.ts
index 6e4c98dd..ab8cb61a 100644
--- a/routes/users.ts
+++ b/routes/users.ts
@@ -883,13 +883,23 @@ export default {
async updateApp(req, res) {
try {
- let { secret, pubkey, max_amount, max_fee, budget_renewal, name } = req.body;
+ let {
+ secret,
+ pubkey,
+ max_amount,
+ max_fee,
+ budget_renewal,
+ name,
+ notify,
+ } = req.body;
+
const { user } = req;
const uid = user.id;
let app = await g(pubkey);
if (app && uid !== app.uid) fail("Unauthorized");
if (secret) pubkey = getPublicKey(secret);
+ notify = String(notify) === "true";
app = {
...app,
@@ -898,6 +908,7 @@ export default {
max_fee,
budget_renewal,
name,
+ notify,
uid,
secret,
};