diff --git a/public/assets/js/account.js b/public/assets/js/account.js index dc5acb9..9d108ab 100644 --- a/public/assets/js/account.js +++ b/public/assets/js/account.js @@ -6,7 +6,7 @@ async function ensureAuthenticated() { try { const me = await apiAction('auth.me', { method: 'GET' }); if (!me?.ok || !me?.user) { - // window.location.href = '/login.php'; + window.location.href = '/login.php'; return false; } window.__currentUser = me.user; diff --git a/public/assets/js/api.js b/public/assets/js/api.js index e637262..a6519c1 100644 --- a/public/assets/js/api.js +++ b/public/assets/js/api.js @@ -35,7 +35,7 @@ async function apiFetch(url, init = {}) { }); if (res.status === 401) { if (!disableAuthRedirect) { - //window.location.href = "/login.php"; + window.location.href = "/login.php"; } throw new Error("unauthorized"); } diff --git a/public/assets/js/app.js b/public/assets/js/app.js index 3735bef..52c76cb 100644 --- a/public/assets/js/app.js +++ b/public/assets/js/app.js @@ -16,7 +16,7 @@ async function ensureAuthenticated() { try { const me = await apiAction('auth.me', { method: 'GET' }); if (!me?.ok || !me?.user) { - // window.location.href = '/login.php'; + window.location.href = '/login.php'; return false; } window.__currentUser = me.user;