pre deployed

This commit is contained in:
2020-03-28 08:43:59 +01:00
parent ce1dc3cd7f
commit 80c5eb53b6
6 changed files with 104 additions and 133 deletions

View File

@@ -25,30 +25,7 @@
</template>
<script>
import { mapGetters } from 'vuex'
import Avatar from "./Avatar";
export default {
name: "Nav",
components: {
Avatar
},
computed: {
...mapGetters({
authUser: 'authUser'
})
},
methods: {
logout: function () {
axios.post('logout')
.then(res => {
if(res.status ===302 || 401) {
window.location.href = '/login'
}
}).catch(error => {
})
}
}
}
</script>

View File

@@ -46,5 +46,17 @@
authUser: 'authUser',
})
},
methods: {
logout: function () {
axios.post('logout')
.then(res => {
if(res.status ===302 || 401) {
window.location.href = '/login'
}
}).catch(error => {
})
}
}
}
</script>