summaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'frontend')
-rw-r--r--frontend/main.js3
-rw-r--r--frontend/start.js5
2 files changed, 6 insertions, 2 deletions
diff --git a/frontend/main.js b/frontend/main.js
index 2b35977..90c3e5c 100644
--- a/frontend/main.js
+++ b/frontend/main.js
@@ -1,8 +1,7 @@
// --- begin, important constants
const data = {
duration: 1, // will be multiplied by 30
- block: 1,
- machine: 2,
+ machine_id: ""
}
const API_URL = "https://backend.laundryweb.altafcreator.com"
diff --git a/frontend/start.js b/frontend/start.js
index 4c860e5..f79033d 100644
--- a/frontend/start.js
+++ b/frontend/start.js
@@ -1,6 +1,11 @@
document.getElementById("startbtn").addEventListener("click", () => {
start();
});
+
+const urlParams = new URLSearchParams(window.location.search);
+data.machine_id = urlParams.get('machine');
+console.log(urlParams);
+
startUpdateMachines();
const notbtn = document.getElementById("notbtn")