diff options
Diffstat (limited to 'src/store')
-rw-r--r-- | src/store/api.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/store/api.js b/src/store/api.js index 463e0d86..04caea12 100644 --- a/src/store/api.js +++ b/src/store/api.js @@ -4,6 +4,14 @@ const api = Axios.create({ withCredentials: true }); +api.interceptors.response.use(undefined, error => { + let response = error.response; + // TODO: Provide user with a notification and way to keep system active + if (response.status == 401) { + window.location = '/login'; + } +}); + export default { get(path) { return api.get(path); |