Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
scc-net
netvs
netvs-core
Commits
5f731c55
Commit
5f731c55
authored
Jul 02, 2020
by
janis.streib
🦉
Browse files
UPD: invalidate session on (expired?) token
parent
dd57520d
Pipeline
#95395
passed with stages
in 6 minutes and 56 seconds
Changes
1
Pipelines
4
Show whitespace changes
Inline
Side-by-side
frontend/src/main.js
View file @
5f731c55
...
...
@@ -18,6 +18,7 @@ import vuexUndoRedo from './mixins/vuex-undo-redo'
import
APIUtil
from
'
./util/apiutil
'
import
WAPITransactionSerice
from
'
./api-services/transaction.service
'
import
LoginService
from
'
@/api-services/login.service
'
Vue
.
use
(
Vuex
)
Vue
.
mixin
(
titleMixin
)
...
...
@@ -255,16 +256,18 @@ Axios.interceptors.response.use(
function
(
response
)
{
return
response
;
},
function
(
error
)
{
async
function
(
error
)
{
// handle error
if
(
error
.
response
)
{
var
stat
=
error
.
response
.
status
switch
(
stat
)
{
case
401
:
await
LoginService
.
logout
(
null
)
store
.
commit
(
'
logout
'
)
router
.
push
(
'
/login
'
)
break
;
case
403
:
await
LoginService
.
logout
(
null
)
store
.
commit
(
'
logout
'
)
router
.
push
(
'
/login
'
)
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment