Fix token not being saved to storage during login

This commit is contained in:
Bubka 2020-01-15 23:12:37 +01:00
parent a029eb48fb
commit 272a2fe6d3

View File

@ -61,6 +61,8 @@
password: this.password
})
.then(response => {
localStorage.setItem('user',response.data.message.name)
localStorage.setItem('jwt',response.data.message.token)
if (localStorage.getItem('jwt') != null){
this.$router.go('/');