Give more specific reason for failed login

This commit is contained in:
wakarimasen 2017-03-08 19:22:56 +01:00
parent c0e8111d64
commit ccc460bb5e
3 changed files with 9 additions and 5 deletions

View file

@ -10,8 +10,8 @@ const LoginForm = {
submit () {
this.$store.dispatch('loginUser', this.user).then(
() => { this.$router.push('/main/friends')},
() => {
this.authError = true
(error) => {
this.authError = error
this.user.username = ''
this.user.password = ''
}