diff --git a/frontend/js/config.js b/frontend/js/config.js index 11c07d9..799cffc 100644 --- a/frontend/js/config.js +++ b/frontend/js/config.js @@ -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 = '/'; }); } }); }