fix: tokn timeout redirect
This commit is contained in:
@@ -33,7 +33,7 @@ api.interceptors.request.use(
|
||||
|
||||
return config;
|
||||
},
|
||||
(error) => Promise.reject(error)
|
||||
(error) => Promise.reject(error),
|
||||
);
|
||||
|
||||
api.interceptors.response.use(
|
||||
@@ -50,12 +50,13 @@ api.interceptors.response.use(
|
||||
rtl: true,
|
||||
});
|
||||
if (typeof logOut === "function") {
|
||||
window.location.href = "/";
|
||||
logOut();
|
||||
}
|
||||
}
|
||||
}
|
||||
return Promise.reject(error);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
export default api;
|
||||
|
||||
Reference in New Issue
Block a user