diff options
| author | Adam Soltys <[email protected]> | 2023-05-22 10:09:05 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-05-22 10:09:05 -0700 |
| commit | dd5eeb5e3768e6e614c7b206510f602781c8ba2b (patch) | |
| tree | 679ce7a32c7da99061b286e6536437528cfc4882 | |
| parent | 4d042dac524713773a642eb2a061ddb7c57342db (diff) | |
| download | coinos-server-dd5eeb5e3768e6e614c7b206510f602781c8ba2b.tar.gz coinos-server-dd5eeb5e3768e6e614c7b206510f602781c8ba2b.zip | |
check for null pot
| -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 8857b355..1e1a495a 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 (typeof amount === 'undefined') return bail(res, "pot not found"); + if (typeof amount === 'undefined' || amount === null) 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}`))); |
