Update axios.js

This commit is contained in:
jb-alvarado 2020-05-25 10:45:11 +02:00 committed by GitHub
parent 0ad74bb75f
commit 6f1c7e40e6

View File

@ -17,7 +17,7 @@ export default function ({ $axios, store, redirect }) {
const originalRequest = error.config
// prevent infinite loop
if (error.response.status === 401 && originalRequest.url.includes('auth/refresh/refresh')) {
if (error.response.status === 401 && originalRequest.url.includes('auth/refresh')) {
store.commit('auth/REMOVE_TOKEN')
redirect('/')
return Promise.reject(error)