diff options
| author | Adam Soltys <[email protected]> | 2023-05-21 22:01:42 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-05-21 22:01:45 -0700 |
| commit | 4d042dac524713773a642eb2a061ddb7c57342db (patch) | |
| tree | 27c44be4a89a3872805cf169004c0c4e769d8a55 /routes | |
| parent | 914b29270f673dfa02a1586ab2a9701d1c98fbc8 (diff) | |
| download | coinos-server-4d042dac524713773a642eb2a061ddb7c57342db.tar.gz coinos-server-4d042dac524713773a642eb2a061ddb7c57342db.zip | |
return pots even with zero balance
Diffstat (limited to 'routes')
| -rw-r--r-- | routes/payments.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routes/payments.js b/routes/payments.js index 73ffa1df..8857b355 100644 --- a/routes/payments.js +++ b/routes/payments.js @@ -185,7 +185,7 @@ export default { async pot({ params: { name } }, res) { let amount = await g(`pot:${name}`); - if (!amount) return bail(res, "pot not found"); + if (typeof amount === 'undefined') return bail(res, "pot not found"); let payments = (await db.lRange(`pot:${name}:payments`, 0, -1)) || []; payments = await Promise.all(payments.map(hash => g(`payment:${hash}`))); |
