diff --git a/src/services/api.ts b/src/services/api.ts index 5f57fcc..3c05905 100644 --- a/src/services/api.ts +++ b/src/services/api.ts @@ -30,9 +30,8 @@ api.interceptors.response.use( response => response, error => { const status = error.response?.status - const currentPath = window.location.pathname - if (status === 401 && !currentPath.endsWith('/login')) { + if (status === 401) { localStorage.removeItem('user') localStorage.removeItem('authToken') window.location.href = '/login'