fix base url
This commit is contained in:
parent
54d8ff3444
commit
84454e66dc
@ -6,7 +6,7 @@ const getToken = () => {
|
||||
}
|
||||
|
||||
export const api = axios.create({
|
||||
baseURL: 'https://enaklo-pos-be.altru.id/api/v1',
|
||||
baseURL: 'https://api-pos.apskel.id/api/v1',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
@ -33,8 +33,6 @@ 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'
|
||||
}
|
||||
|
||||
@ -49,3 +47,4 @@ api.interceptors.response.use(
|
||||
return Promise.reject(error)
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user