From a53540dc5f96042acc48ff70c470c1d206765a6a Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 15 Dec 2022 13:35:30 -0800 Subject: rebase on conversions --- routes/invoices.js | 14 +++++++------- routes/locations.js | 12 +++++++----- routes/payments.js | 2 +- 3 files changed, 15 insertions(+), 13 deletions(-) (limited to 'routes') diff --git a/routes/invoices.js b/routes/invoices.js index 0ab2cd7f..82b5d4db 100644 --- a/routes/invoices.js +++ b/routes/invoices.js @@ -184,13 +184,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"); -- cgit v1.2.3