diff options
| author | Adam Soltys <[email protected]> | 2023-02-08 05:08:25 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-02-08 05:08:26 +0000 |
| commit | 1471bd3de4e2fac32bd751cdb1cff628999e9a07 (patch) | |
| tree | 5dcc7e81a351a6e40c57485d0802ca027096d293 /routes/payments.js | |
| parent | 0f06fddc647ad3fa050b39bc53af18732f3d9f87 (diff) | |
| download | coinos-server-1471bd3de4e2fac32bd751cdb1cff628999e9a07.tar.gz coinos-server-1471bd3de4e2fac32bd751cdb1cff628999e9a07.zip | |
quiet socket errors
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({}); - } }; |
