diff options
| author | altaf-creator <dev@altafcreator.com> | 2025-11-29 23:47:09 +0700 |
|---|---|---|
| committer | altaf-creator <dev@altafcreator.com> | 2025-11-29 23:47:09 +0700 |
| commit | 1f532d12d4fd8df4116a63ea62a8b21eba1d2db3 (patch) | |
| tree | e32f64fcc26f16b4ba4025deb3c1d6a2431e10ef /frontend/main.js | |
| parent | bbf906b8f3b6a29ec3b903a99bd5a266ae66d134 (diff) | |
response codes
Diffstat (limited to 'frontend/main.js')
| -rw-r--r-- | frontend/main.js | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/frontend/main.js b/frontend/main.js index 6f953ce..40a965b 100644 --- a/frontend/main.js +++ b/frontend/main.js @@ -7,16 +7,6 @@ const data = { const API_URL = "https://backend.laundryweb.altafcreator.com" -// --- permission request -const btn = document.getElementById("notbtn") -if (btn) { - btn.addEventListener("click", () => requestPermission()) - function requestPermission() { - console.log("Requesting permission..."); - OneSignal.Notifications.requestPermission(); - } -} - // --- check user status // returns true if there exists a timer, and returns false otherwise. // cookie need to be included. @@ -216,7 +206,7 @@ async function fetchTimers() { method: "POST", credentials: "include", }); - return await response.json(); + return [response.status, response.json()]; } const delay = (durationMs) => { |
