summaryrefslogtreecommitdiffstats
path: root/webapp/src/main.js
diff options
context:
space:
mode:
authorUdo Walter2019-02-24 03:41:35 +0100
committerUdo Walter2019-02-24 03:41:35 +0100
commit40dc6c93cbb64ce85a5f56085772bcd44e2eebda (patch)
tree24f093e62d683cb6c4067b6fc649c68a0fb0442a /webapp/src/main.js
parent[account] Add editable user info, change statuscodes, delete account (diff)
downloadbas-40dc6c93cbb64ce85a5f56085772bcd44e2eebda.tar.gz
bas-40dc6c93cbb64ce85a5f56085772bcd44e2eebda.tar.xz
bas-40dc6c93cbb64ce85a5f56085772bcd44e2eebda.zip
[webapp/configurator] switch from old table to the new data table
Diffstat (limited to 'webapp/src/main.js')
-rw-r--r--webapp/src/main.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/webapp/src/main.js b/webapp/src/main.js
index 2665c0a..5b921e0 100644
--- a/webapp/src/main.js
+++ b/webapp/src/main.js
@@ -59,12 +59,16 @@ Vue.use(VueCodemirror, {
Vue.use(VueTouch)
axios.interceptors.response.use(null, error => {
- if (error && (error.response.data.status === 'TOKEN_INVALID' || error.response.data.status === 'TOKEN_MISSING')) {
- axios.post('/api/authentication/logout').then(response => { router.push('/login') })
+ if (error && error.response.status === 401) {
+ axios.post('/api/authentication/logout').then(response => {
+ router.push('/login')
+ socket.close()
+ })
}
return Promise.reject(error)
})
+
const socket = io({
autoConnect: false,
transports: ['websocket']