fix: logout redirige vers / (page login) au lieu de reload
CI / lint (push) Failing after 2s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / e2e (push) Has been skipped
CI / security (push) Failing after -6s

This commit is contained in:
2026-06-16 12:39:44 -04:00
parent 6c2a9f716a
commit 9f382e4960
+4 -4
View File
@@ -639,8 +639,8 @@ function initConfigModal() {
logoutBtn.addEventListener("click", function() {
if (confirm("Voulez-vous vraiment vous deconnecter ?")) {
fetch("/api/auth/logout", { method: "POST" })
.then(function() { window.location.reload(); })
.catch(function() { window.location.reload(); });
.then(function() { window.location.href = "/"; })
.catch(function() { window.location.href = "/"; });
}
});
}
@@ -1571,8 +1571,8 @@ function initProfile() {
logoutBtn.addEventListener('click', function() {
if (confirm('Voulez-vous vraiment vous deconnecter ?')) {
fetch('/api/auth/logout', { method: 'POST' })
.then(function() { window.location.reload(); })
.catch(function() { window.location.reload(); });
.then(function() { window.location.href = '/'; })
.catch(function() { window.location.href = '/'; });
}
});
}