fixes part 6

This commit is contained in:
Čarodej
2022-03-03 07:37:28 +01:00
parent 4b751a29c2
commit 6ca2269c80
6 changed files with 29 additions and 16 deletions

View File

@@ -37,13 +37,26 @@ const actions = {
})
}, 300)
axios.post('/logout').then(() => {
clearTimeout(popup)
commit('DESTROY_DATA')
commit('SET_AUTHORIZED', false)
axios
.post('/logout')
.then(() => {
clearTimeout(popup)
router.push({ name: 'Homepage' })
})
commit('DESTROY_DATA')
commit('SET_AUTHORIZED', false)
router.push({name: 'Homepage'})
})
.catch((error) => {
if (error.response.status === 419) {
clearTimeout(popup)
commit('DESTROY_DATA')
commit('SET_AUTHORIZED', false)
router.push({name: 'Homepage'})
}
})
},
socialiteRedirect: ({ commit }, provider) => {
axios