diff options
| author | Adam Soltys <[email protected]> | 2025-08-26 21:52:40 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-08-26 21:52:40 -0700 |
| commit | 0dc07d2e32a9afc5ae4728bb2c7c9b9b52059cdf (patch) | |
| tree | 24f02bb565c7113235c0cbe61a2cb1fe8e9702be /routes | |
| parent | 85c40814aec0be2c77a801a84d100937e6396543 (diff) | |
| download | coinos-server-0dc07d2e32a9afc5ae4728bb2c7c9b9b52059cdf.tar.gz coinos-server-0dc07d2e32a9afc5ae4728bb2c7c9b9b52059cdf.zip | |
handle 0 tip
Diffstat (limited to 'routes')
| -rw-r--r-- | routes/invoices.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routes/invoices.ts b/routes/invoices.ts index a2bab026..430c926d 100644 --- a/routes/invoices.ts +++ b/routes/invoices.ts @@ -53,7 +53,7 @@ export default { try { const { id } = req.params; const { body } = req; - if (!body.invoice?.tip || body.invoice.tip < 0) fail("Invalid tip"); + if (body.invoice?.tip == null || body.invoice.tip < 0) fail("Invalid tip"); let invoice = await g(`invoice:${id}`); const user = await g(`user:${invoice.uid}`); |
