Expense List Table
This commit is contained in:
+2
-1
@@ -33,6 +33,8 @@ api.interceptors.response.use(
|
||||
const currentPath = window.location.pathname
|
||||
|
||||
if (status === 401 && !currentPath.endsWith('/login')) {
|
||||
localStorage.removeItem('user')
|
||||
localStorage.removeItem('authToken')
|
||||
window.location.href = '/login'
|
||||
}
|
||||
|
||||
@@ -47,4 +49,3 @@ api.interceptors.response.use(
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user