Обновление history при переходе

This commit is contained in:
2021-06-03 22:49:56 +03:00
parent 1222e4911a
commit 87bda59150
2 changed files with 11 additions and 1 deletions

View File

@@ -34,12 +34,20 @@ export default {
auth(image) {
if (image) {
this.loggedin = true
this.image = image
this.image = image
history.pushState(
{},
'logged in'
)
}
},
logout() {
axios.post('http://127.0.0.1:3000/api/logout').then(() => {
this.loggedin = false
history.pushState(
{},
'logged out'
)
});
}
}