updated authen

This commit is contained in:
Warunee Tamkoo 2024-07-25 11:40:47 +07:00
parent 9ec6a7696a
commit c1f0ac7939
5 changed files with 39 additions and 28 deletions

View file

@ -31,6 +31,8 @@ http.interceptors.response.use(
// eslint-disable-next-line no-prototype-builtins
if (error.hasOwnProperty('response')) {
if (error.response.status === 401 || error.response.status === 403) {
window.location.href = '/login'
// Store.commit("SET_ERROR_MESSAGE", error.response.data.message);
// Store.commit("REMOVE_ACCESS_TOKEN")
}