Changed endpoints and db queries, chart now shows suggested mins and maxes

This commit is contained in:
Daniel Ledda
2020-11-07 01:35:27 +01:00
parent 26224ace0d
commit fa347815cc

View File

@@ -17,7 +17,7 @@
const co2Color = 'rgb(194,30,30)'; const co2Color = 'rgb(194,30,30)';
async function getData() { async function getData() {
let urlEndpoint = "/" + "ROOT_URL" + "data/"; let urlEndpoint = "/" + ROOT_URL + "data/";
const pathname = window.location.pathname; const pathname = window.location.pathname;
if (pathname.includes("since")) { if (pathname.includes("since")) {
urlEndpoint += "since/" + pathname.slice(pathname.lastIndexOf("/") + 1); urlEndpoint += "since/" + pathname.slice(pathname.lastIndexOf("/") + 1);