Add username state

This commit is contained in:
2020-04-13 16:17:03 +02:00
parent 956ba2b883
commit 47a7339bf5
3 changed files with 7 additions and 2 deletions
+2 -1
View File
@@ -53,7 +53,7 @@
}
},
methods: {
...mapMutations(['setToken']),
...mapMutations(['setToken', 'setUsername']),
signin() {
this.error = false
@@ -65,6 +65,7 @@
})
.then(response => {
this.setToken({token: response.data.token})
this.setUsername({username: this.form.username})
})
.catch(error => {
console.log(error)