diff options
Diffstat (limited to 'routes/locations.js')
| -rw-r--r-- | routes/locations.js | 12 |
1 files changed, 7 insertions, 5 deletions
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(); |
