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