commit 20/10/2025
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user