diff options
Diffstat (limited to 'routes/payments.js')
| -rw-r--r-- | routes/payments.js | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/routes/payments.js b/routes/payments.js index ec557474..a11934ea 100644 --- a/routes/payments.js +++ b/routes/payments.js @@ -242,20 +242,4 @@ export default { res.send({ txid }); }, - - async del({ params: { username }, headers: { authorization } }, res) { - if (!authorization.includes(config.admin)) - return res.code(401).send("unauthorized"); - let { id, pubkey } = await g(`user:${await g(`user:${username}`)}`); - let invoices = await db.lRange(`${id}:invoices`, 0, -1); - let payments = await db.lRange(`${id}:payments`, 0, -1); - - for (let { id } of invoices) db.del(`invoice:${id}`); - for (let { id } of payments) db.del(`payment:${id}`); - db.del(`user:${username}`); - db.del(`user:${id}`); - db.del(`user:${pubkey}`); - - res.send({}); - } }; |
