Merge pull request #229 from naturallaw777/copilot/fix-reboot-issue-fetch-call
fix: use apiFetch in doReboot() to send session credentials with reboot request
This commit is contained in:
@@ -174,7 +174,7 @@ function doReboot() {
|
|||||||
if ($rebootOverlay) $rebootOverlay.classList.add("visible");
|
if ($rebootOverlay) $rebootOverlay.classList.add("visible");
|
||||||
_rebootStartTime = Date.now();
|
_rebootStartTime = Date.now();
|
||||||
_serverWentDown = false;
|
_serverWentDown = false;
|
||||||
fetch("/api/reboot", { method: "POST" }).catch(function() {});
|
apiFetch("/api/reboot", { method: "POST" }).catch(function() {});
|
||||||
// Wait 15 seconds before the first check — give the system time to actually shut down
|
// Wait 15 seconds before the first check — give the system time to actually shut down
|
||||||
setTimeout(waitForServerReboot, 15000);
|
setTimeout(waitForServerReboot, 15000);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user