summaryrefslogtreecommitdiff
path: root/src/store/api.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/store/api.js')
-rw-r--r--src/store/api.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/store/api.js b/src/store/api.js
index 4918d804..0f8c9484 100644
--- a/src/store/api.js
+++ b/src/store/api.js
@@ -10,12 +10,16 @@ api.interceptors.response.use(undefined, error => {
// TODO: Provide user with a notification and way to keep system active
if (response.status == 401) {
- window.location = '/login';
+ if (response.config.url != '/login') {
+ window.location = '/login';
+ }
}
if (response.status == 403) {
router.push({ name: 'unauthorized' });
}
+
+ return Promise.reject(error);
});
export default {