migrate vuex modules
This commit is contained in:
1 parent
9c5ce9acf3
commit
f39e155301
17 files changed
+177
-133
No files matched your search
@@ -15,7 +15,7 @@ const httpClient: AxiosInstance = axios.create({
|
||||
});
|
||||
|
||||
httpClient.interceptors.request.use((config) => {
|
||||
const accessToken = store.getters.token.access;
|
||||
const accessToken = store.state.common.token?.access;
|
||||
if (!config.headers) {
|
||||
config.headers = {};
|
||||
}
|
||||
@@ -31,7 +31,7 @@ httpClient.interceptors.response.use(
|
||||
},
|
||||
(error) => {
|
||||
if (error?.response?.status === 401) {
|
||||
store.dispatch('resetAuth');
|
||||
store.dispatch('common/resetAuth');
|
||||
router.push({
|
||||
name: ROUTE_AUTH_LOGIN,
|
||||
query: {
|
||||
|
||||
Reference in new issue
Block a user