Changed endpoints and db queries, chart now shows suggested mins and maxes
This commit is contained in:
@@ -17,8 +17,9 @@
|
|||||||
|
|
||||||
async function getData() {
|
async function getData() {
|
||||||
let urlEndpoint = "data/";
|
let urlEndpoint = "data/";
|
||||||
if (window.location.includes("since")) {
|
const pathname = window.location.pathname;
|
||||||
urlEndpoint += "since/" + window.location.slice(window.location.lastIndexOf("/") + 1);
|
if (pathname.includes("since")) {
|
||||||
|
urlEndpoint += "since/" + pathname.slice(pathname.lastIndexOf("/") + 1);
|
||||||
}
|
}
|
||||||
const data = await fetch(urlEndpoint);
|
const data = await fetch(urlEndpoint);
|
||||||
return transformData(await data.json());
|
return transformData(await data.json());
|
||||||
|
|||||||
Reference in New Issue
Block a user