Client - refactoring (rename auth user store)

This commit is contained in:
Sam
2021-11-03 10:41:53 +01:00
parent 3a1245a2e0
commit f97c7ae4d0
66 changed files with 406 additions and 368 deletions

View File

@ -1,7 +1,7 @@
import axios from 'axios'
import store from '@/store'
import { USER_STORE } from '@/store/constants'
import { AUTH_USER_STORE } from '@/store/constants'
import { getApiUrl } from '@/utils'
const authApi = axios.create({
@ -10,7 +10,7 @@ const authApi = axios.create({
authApi.interceptors.request.use(
(config) => {
const authToken = store.getters[USER_STORE.GETTERS.AUTH_TOKEN]
const authToken = store.getters[AUTH_USER_STORE.GETTERS.AUTH_TOKEN]
if (authToken) {
const auth = `Bearer ${authToken}`
if (config.headers.Authorization !== auth) {