diff options
Diffstat (limited to 'routes')
| -rw-r--r-- | routes/payments.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/routes/payments.js b/routes/payments.js index 71260e11..425561f1 100644 --- a/routes/payments.js +++ b/routes/payments.js @@ -233,6 +233,7 @@ export default { async take({ body: { name, amount, hash }, user }, res) { amount = parseInt(amount); + if (amount < 0) fail("Invalid amount"); await t(`pot:${name}`, async (balance, db) => { if (balance < amount) fail("Insufficient funds"); |
