diff options
| author | Adam Soltys <[email protected]> | 2023-02-10 23:36:34 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-02-11 00:37:46 -0800 |
| commit | 60cf57d56f617998e093e81b229e18c9a221e312 (patch) | |
| tree | a7d0dbc1096b00cdc940ce1138e527fdbf92c2c2 /routes/payments.js | |
| parent | a059697ad1dab4308f9bc9c2957dc574f6e5518a (diff) | |
| download | coinos-server-60cf57d56f617998e093e81b229e18c9a221e312.tar.gz coinos-server-60cf57d56f617998e093e81b229e18c9a221e312.zip | |
prettier
Diffstat (limited to 'routes/payments.js')
| -rw-r--r-- | routes/payments.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/routes/payments.js b/routes/payments.js index 0ee2bce0..eee0990b 100644 --- a/routes/payments.js +++ b/routes/payments.js @@ -43,9 +43,7 @@ export default { if (invoice) { if (invoice.uid === user.id) fail("Cannot send to self"); hash = payment_hash; - } - - else { + } else { p = await debit( hash, amount + maxfee, @@ -109,7 +107,9 @@ export default { }, async get({ params: { hash } }, res) { - res.send(await g(`payment:${hash}`)); + let p = await g(`payment:${hash}`); + if (p.type === types.internal) p.with = await g(`user:${p.ref}`); + res.send(p); }, async parse({ body: { payreq } }, res) { |
