From 9f382e496046030bee798c0a8ba2c86ad911e23f Mon Sep 17 00:00:00 2001 From: Bruno Charest Date: Tue, 16 Jun 2026 12:39:44 -0400 Subject: [PATCH] fix: logout redirige vers / (page login) au lieu de reload --- frontend/js/config.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 = '/'; }); } }); }