Some checks failed
continuous-integration/drone/push Build is failing
- Complete GGZ Ecademy Nuxt.js user portal - Learning products browser and management - Member management interface - User authentication and roles - Multi-language support (NL/EN) - Vuex store for state management - Component-based architecture
11 lines
277 B
JavaScript
11 lines
277 B
JavaScript
export default function ({ $axios, app }) {
|
|
$axios.onError(error => {
|
|
const code = parseInt(error.response && error.response.status)
|
|
|
|
if ([401, 403].includes(code)) {
|
|
app.$auth.logout();
|
|
}
|
|
|
|
return Promise.reject(error);
|
|
})
|
|
}; |