diff options
| author | shpuld <shpuld@gmail.com> | 2017-03-09 12:45:12 +0200 |
|---|---|---|
| committer | shpuld <shpuld@gmail.com> | 2017-03-09 12:45:12 +0200 |
| commit | d99b9bdac124b6353adfc9ea0fb52a3b380b91a2 (patch) | |
| tree | 7a901e3264dffb7fec2a3c051653023bb0eb6ffe /src/components/login_form/login_form.js | |
| parent | 507fe7905052e2dc5e9bf3e1ee3caee5239e353b (diff) | |
| parent | 64d71b75cfed41d82a99e3e478fc75d5f81f84bd (diff) | |
Merged with changes in develop & fixed conflicts.
Diffstat (limited to 'src/components/login_form/login_form.js')
| -rw-r--r-- | src/components/login_form/login_form.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/components/login_form/login_form.js b/src/components/login_form/login_form.js index 827c704c..1a6f6015 100644 --- a/src/components/login_form/login_form.js +++ b/src/components/login_form/login_form.js @@ -1,13 +1,21 @@ const LoginForm = { data: () => ({ - user: {} + user: {}, + authError: false }), computed: { loggingIn () { return this.$store.state.users.loggingIn } }, methods: { submit () { - this.$store.dispatch('loginUser', this.user) + this.$store.dispatch('loginUser', this.user).then( + () => {}, + (error) => { + this.authError = error + this.user.username = '' + this.user.password = '' + } + ) } } } |
