mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-11-08 17:34:39 +01:00
26 lines
462 B
JavaScript
26 lines
462 B
JavaScript
|
import Vue from 'vue'
|
||
|
|
||
|
Vue.mixin({
|
||
|
|
||
|
data: function () {
|
||
|
return {
|
||
|
appVersion: window.appVersion
|
||
|
}
|
||
|
},
|
||
|
|
||
|
methods: {
|
||
|
|
||
|
async appLogout(evt) {
|
||
|
|
||
|
await this.axios.get('api/logout')
|
||
|
|
||
|
localStorage.removeItem('jwt')
|
||
|
localStorage.removeItem('user')
|
||
|
|
||
|
delete this.axios.defaults.headers.common['Authorization']
|
||
|
|
||
|
this.$router.push({ name: 'login' })
|
||
|
},
|
||
|
}
|
||
|
|
||
|
})
|