From 48001868b418c500d96801bf31b5f7b5c4f4d79c Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 12 Mar 2025 15:19:05 -0700 Subject: opt in nwc notifications --- routes/users.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'routes') 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, }; -- cgit v1.2.3