diff --git a/src/api/index.js b/src/api/index.js index fab893f1..77fdedbf 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -177,11 +177,11 @@ const CITIES_LOCATION = { }; const API_TOKEN = process.env.NEXT_PUBLIC_APP_API_TOKEN; -const API_BASE_URL = process.env.NEXT_PUBLIC_APP_API_BASE_UR; +const API_BASE_URL = process.env.NEXT_PUBLIC_APP_API_BASE_URL; const API = { getAirData(city) { - return fetch(`${API_BASE_URL}/data/air/?city=${city}`, { + return fetch(`${API_BASE_URL}/data/stats/air/?city=${city}`, { headers: { Authorization: `Token ${API_TOKEN}`, "Content-Type": "application/json", @@ -193,7 +193,7 @@ const API = { .toISOString() .substring(0, 10); return fetch( - `${API_BASE_URL}/data/air/?city=${city}&from=${fromDate}&interval=day&value_type=P2`, + `${API_BASE_URL}/data/stats/air/?city=${city}&from=${fromDate}&interval=day&value_type=P2`, { headers: { Authorization: `Token ${API_TOKEN}`, diff --git a/src/components/Embeds/AirMap.js b/src/components/Embeds/AirMap.js index ed095564..e707d56e 100644 --- a/src/components/Embeds/AirMap.js +++ b/src/components/Embeds/AirMap.js @@ -4,9 +4,11 @@ import React from "react"; import { CITIES_LOCATION } from "api"; function AirMap({ city }) { + const appMapUrl = process.env.NEXT_PUBLIC_APP_MAP_URL; + return (