diff options
| author | Adam Soltys <[email protected]> | 2022-12-15 13:35:30 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-12-15 13:35:30 -0800 |
| commit | 1ac8f4279e0e53e2d4e18b59ff4b54acee2d2c57 (patch) | |
| tree | 7c95dfb6e60bcc8b5cd758b86f21b2a3e18efe7d /routes | |
| parent | e8525c6b4402346b5e19d7dd40d79e076a95941f (diff) | |
| download | coinos-server-1ac8f4279e0e53e2d4e18b59ff4b54acee2d2c57.tar.gz coinos-server-1ac8f4279e0e53e2d4e18b59ff4b54acee2d2c57.zip | |
prettier
Diffstat (limited to 'routes')
| -rw-r--r-- | routes/invoices.js | 14 | ||||
| -rw-r--r-- | routes/locations.js | 12 | ||||
| -rw-r--r-- | routes/payments.js | 2 |
3 files changed, 15 insertions, 13 deletions
diff --git a/routes/invoices.js b/routes/invoices.js index 7fa82afb..d689775f 100644 --- a/routes/invoices.js +++ b/routes/invoices.js @@ -183,13 +183,13 @@ app.post("/invoice", optionalAuth, async (req, res, next) => { if (!existing) emit(request.requester.username, "invoice", { - amount: invoice.amount, - currency: invoice.currency, - rate: invoice.rate, - request_id, - uuid: invoice.uuid, - user: { username: user.username, profile: user.profile } - }); + amount: invoice.amount, + currency: invoice.currency, + rate: invoice.rate, + request_id, + uuid: invoice.uuid, + user: { username: user.username, profile: user.profile } + }); } } diff --git a/routes/locations.js b/routes/locations.js index 3e0fee4c..63bfe1a1 100644 --- a/routes/locations.js +++ b/routes/locations.js @@ -8,12 +8,14 @@ app.get("/locations", async (req, res) => { }); let getLocations = async () => { - let { data } = await axios.get('https://api.btcmap.org/v2/elements?updated_since=2022-09-19'); - locations = data.filter( - (l) => l['osm_json'].tags && l['osm_json'].tags['payment:coinos'] === 'yes' - ); + let { data } = await axios.get( + "https://api.btcmap.org/v2/elements?updated_since=2022-09-19" + ); + locations = data.filter( + l => l["osm_json"].tags && l["osm_json"].tags["payment:coinos"] === "yes" + ); setTimeout(getLocations, 60000); -} +}; getLocations(); diff --git a/routes/payments.js b/routes/payments.js index 96791bb3..da55f1ec 100644 --- a/routes/payments.js +++ b/routes/payments.js @@ -154,7 +154,7 @@ app.get("/payment/:redeemcode", async (req, res) => { }); payment = payment.get({ plain: true }); - payment.redeemer = payment['with']; + payment.redeemer = payment["with"]; if (!payment) fail("invalid code"); |
