fix/geolocation api key
This commit is contained in:
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -505,7 +505,7 @@ module.exports = (middleware, users, plans, assets) => {
|
||||
});
|
||||
router.get("/exRates/:lat/:lon", async (req, res) => {
|
||||
if (!req.session.geoData.country) {
|
||||
const response = await fetch(`https://maps.googleapis.com/maps/api/geocode/json?latlng=${req.params.lat},${req.params.lon}&result_type=country&key=${process.env.geolocation_api}`);
|
||||
const response = await fetch(`https://maps.googleapis.com/maps/api/geocode/json?latlng=${req.params.lat},${req.params.lon}&result_type=country&key=${process.env.GEOLOCATION_API}`);
|
||||
const data = await response.json();
|
||||
|
||||
country = data.results[0].formatted_address;
|
||||
|
||||
Reference in new issue
Block a user