diff options
| author | Adam Soltys <[email protected]> | 2023-02-21 08:25:42 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-02-21 08:25:42 -0800 |
| commit | a311401e50cbc70f5d613097607cb55466aa4061 (patch) | |
| tree | 52828cda0fc7060c9bdff7345e587b167a6eccb2 /routes | |
| parent | b3cca3e37bc654d364736db66732a6aa38ccfd84 (diff) | |
| download | coinos-server-a311401e50cbc70f5d613097607cb55466aa4061.tar.gz coinos-server-a311401e50cbc70f5d613097607cb55466aa4061.zip | |
prettier
Diffstat (limited to 'routes')
| -rw-r--r-- | routes/info.js | 2 | ||||
| -rw-r--r-- | routes/invoices.js | 2 | ||||
| -rw-r--r-- | routes/nostr.js | 2 | ||||
| -rw-r--r-- | routes/users.js | 13 |
4 files changed, 13 insertions, 6 deletions
diff --git a/routes/info.js b/routes/info.js index eda028d2..45408269 100644 --- a/routes/info.js +++ b/routes/info.js @@ -7,7 +7,7 @@ export default { let lnwallet; let b = 0; - for await (let k of db.scanIterator({ MATCH: "balance:*" })) { + for await (let k of db.scanIterator({ MATCH: "balance:*" })) { b += parseInt(await db.get(k)); } diff --git a/routes/invoices.js b/routes/invoices.js index bbbae760..d52b34cc 100644 --- a/routes/invoices.js +++ b/routes/invoices.js @@ -14,7 +14,7 @@ export default { if (invoice) { invoice.user = await g(`user:${invoice.uid}`); invoice.id = hash; - } else if(config.classic) { + } else if (config.classic) { invoice = await got(`${config.classic}/invoice/${hash}`).json(); if (!invoice) fail("invoice not found"); invoice.id = invoice.uuid; diff --git a/routes/nostr.js b/routes/nostr.js index 8d6f6c34..eff956d1 100644 --- a/routes/nostr.js +++ b/routes/nostr.js @@ -74,7 +74,7 @@ export default { let aid = await g(`user:${m.pubkey}`); m.author = await g(`user:${aid}`); - let rid = await g(`user:${m.tags[0][1]}`); + let rid = await g(`user:${m.tags[0][1]}`); m.recipient = await g(`user:${rid}`); return m; diff --git a/routes/users.js b/routes/users.js index 955a5ca7..099e3540 100644 --- a/routes/users.js +++ b/routes/users.js @@ -231,7 +231,14 @@ export default { }).json(); for (let p of payments) { - let n = pick(p, ["amount", "fee", "confirmed", "rate", "currency", "preimage"]); + let n = pick(p, [ + "amount", + "fee", + "confirmed", + "rate", + "currency", + "preimage" + ]); n.id = v4(); n.created = parseISO(p.createdAt).getTime(); n.type = p.network; @@ -391,9 +398,9 @@ export default { async lower(req, res) { for await (let k of db.scanIterator({ MATCH: "payment:*" })) { let p = await g(k); - if (p.ref && p.ref.startsWith('2dad97')) console.log(k, p); + if (p.ref && p.ref.startsWith("2dad97")) console.log(k, p); } res.send("ok"); - }, + } }; |
