Update index.html

Ryan Danenberg committed commitb2d1a152a54d559d296b7c83706cfccb7938ad04 Browse files
1 file changed+1−17
index.html+1−17View file
@@ -1538,23 +1538,7 @@
}
}
- if (authToken) {
- try {
- const res = await apiFetch('/api/auth/me');
- if (res.ok) {
- const data = await res.json();
- currentUser = data.user || data;
- localStorage.setItem(AUTH_USER_KEY, JSON.stringify(currentUser));
- } else if (res.status === 401) {
- logout(false);
- return;
- }
- } catch (err) {
- console.warn('Backend auth unreachable, using local session state:', err);
- }
- }
-
- if (currentUser) {
+ if (currentUser && authToken) {
applyUserSession(currentUser);
} else {
updateHeaderAuthUI();