efril #13
@ -31,7 +31,7 @@ api.interceptors.response.use(
|
||||
error => {
|
||||
const status = error.response?.status
|
||||
|
||||
if (status === 401 && !currentPath.endsWith('/login')) {
|
||||
if (status === 401) {
|
||||
localStorage.removeItem('user')
|
||||
localStorage.removeItem('authToken')
|
||||
window.location.href = '/login'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user