summaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'frontend')
-rw-r--r--frontend/main.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/frontend/main.js b/frontend/main.js
index 1e1c8f9..e27977d 100644
--- a/frontend/main.js
+++ b/frontend/main.js
@@ -207,7 +207,6 @@ async function startLoadTimers() {
prog.style.width = ((timeRemaining / (timers[i]["duration"] * 60)) * 100).toString() + "%";
if (timeRemaining <= 0) {
- alert(`timer ${i} finished`);
document.getElementById(`timer-btn-${i}`).disabled = false;
}
}
@@ -228,6 +227,9 @@ async function finishLaundryTimer(timerId) {
const response = await fetch(`${API_URL}/finish`, {
method: "POST",
credentials: "include",
+ headers: {
+ "Content-Type": "application/json"
+ },
body: JSON.stringify({id: timerId}),
});
if (await response.text() == "laundry finished") {