fix modal, logout & start todo front
This commit is contained in:
@@ -17,6 +17,18 @@
|
||||
name: "DashBoard",
|
||||
components: {
|
||||
UserAdmin
|
||||
},
|
||||
methods: {
|
||||
logout: function () {
|
||||
axios.post('logout')
|
||||
.then(res => {
|
||||
if(res.status ===302 || 401) {
|
||||
window.location.href = '/login'
|
||||
}
|
||||
}).catch(error => {
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user