aboutsummaryrefslogtreecommitdiffstats
path: root/routes
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-12-15 13:35:30 -0800
committerJohn Barratt <[email protected]>2022-12-19 11:25:54 -0800
commita53540dc5f96042acc48ff70c470c1d206765a6a (patch)
treeed5efffc57fa3a5d817a5f55a156a100217bca01 /routes
parent1b807a117871bd6b1e6897f8bd197b27422bb18f (diff)
downloadcoinos-server-a53540dc5f96042acc48ff70c470c1d206765a6a.tar.gz
coinos-server-a53540dc5f96042acc48ff70c470c1d206765a6a.zip
rebase on conversions
Diffstat (limited to 'routes')
-rw-r--r--routes/invoices.js14
-rw-r--r--routes/locations.js12
-rw-r--r--routes/payments.js2
3 files changed, 15 insertions, 13 deletions
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");