diff options
| author | Adam Soltys <[email protected]> | 2023-10-08 00:16:50 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-10-08 00:16:50 -0700 |
| commit | db38e8f3316a121ba64d7e1c4cfd93b4826d6f4e (patch) | |
| tree | 172eaaed2c04d0c0e6491a68f7b8631a6298bf4b /routes/invoices.js | |
| parent | f599e57af5564c23908632c42d4827e51d120204 (diff) | |
| download | coinos-server-db38e8f3316a121ba64d7e1c4cfd93b4826d6f4e.tar.gz coinos-server-db38e8f3316a121ba64d7e1c4cfd93b4826d6f4e.zip | |
use invoice id instead of hash
Diffstat (limited to 'routes/invoices.js')
| -rw-r--r-- | routes/invoices.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/routes/invoices.js b/routes/invoices.js index 9f2e4c99..d1ef1a68 100644 --- a/routes/invoices.js +++ b/routes/invoices.js @@ -7,14 +7,13 @@ import config from "$config"; import ln from "$lib/ln"; export default { - async get({ params: { hash } }, res) { + async get({ params: { id } }, res) { let pr; - let invoice = await g(`invoice:${hash}`); + let invoice = await g(`invoice:${id}`); if (invoice) { delete invoice.secret; invoice.user = pick(await g(`user:${invoice.uid}`), ['id', 'profile', 'banner', 'currency', 'username']); - invoice.id = hash; } else if (config.classic) { invoice = await got(`${config.classic}/invoice/${pr}`).json(); if (invoice) { |
