commit 20/10/2025

This commit is contained in:
2025-10-21 17:20:01 +07:00
parent 19e587fc36
commit c6aa70773f
13 changed files with 289 additions and 67 deletions

View File

@@ -578,7 +578,18 @@ $(document).ready(function () {
});
})
$('#logoutlink').click(() => {
window.location.href = "login.html"
})
//window.location.href = "login.html"
fetch("/logout", {method: 'GET'})
.then(response => {
if (response.ok) {
window.location.href = "login.html";
} else {
alert("Logout failed: " + response.statusText);
}
})
.catch(error => {
alert("Logout error: " + error.message);
});
});
});