diff options
| author | Adam Soltys <[email protected]> | 2023-08-28 06:33:22 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-08-28 06:33:22 +0000 |
| commit | 01f16b8b019cae200a4d70ffd277c4cdb287ed22 (patch) | |
| tree | ea6233f07790271b360488abed2957675ad74db7 /routes | |
| parent | 60a79d20ab91c37a273a70d6c03336b8d5207fd6 (diff) | |
| download | coinos-server-retransmit.tar.gz coinos-server-retransmit.zip | |
wipretransmit
Diffstat (limited to 'routes')
| -rw-r--r-- | routes/payments.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/routes/payments.js b/routes/payments.js index 425561f1..c13f7bec 100644 --- a/routes/payments.js +++ b/routes/payments.js @@ -232,6 +232,7 @@ export default { }, async take({ body: { name, amount, hash }, user }, res) { + try { amount = parseInt(amount); if (amount < 0) fail("Invalid amount"); @@ -258,6 +259,9 @@ export default { await db.lPush(`pot:${name}:payments`, hash); res.send({ payment }); + } catch(e) { + bail(res, e.message); + } }, async bitcoin({ body: { txid, wallet } }, res) { |
