From 4b5c6dde01fd99fc5962420be37fb850f1fdaeb5 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 6 Jun 2023 00:31:54 -0700 Subject: pass webhook secret --- routes/invoices.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'routes') diff --git a/routes/invoices.js b/routes/invoices.js index f55d997f..fb501b27 100644 --- a/routes/invoices.js +++ b/routes/invoices.js @@ -14,9 +14,10 @@ export default { } let invoice = await g(`invoice:${hash}`); + delete invoice.secret; if (invoice) { - invoice.user = pick(await g(`user:${invoice.uid}`), whitelist); + invoice.user = pick(await g(`user:${invoice.uid}`), ['id', 'currency', 'username']); invoice.id = hash; } else if (config.classic) { invoice = await got(`${config.classic}/invoice/${pr}`).json(); @@ -36,6 +37,7 @@ export default { try { res.send(await generate({ invoice, user, sender })); } catch (e) { + console.log(e); bail(res, e.message); } }, -- cgit v1.2.3