aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/components/login_form/login_form.js23
-rw-r--r--src/components/login_form/login_form.vue1
2 files changed, 13 insertions, 11 deletions
diff --git a/src/components/login_form/login_form.js b/src/components/login_form/login_form.js
index ae9322d5..fb6dc651 100644
--- a/src/components/login_form/login_form.js
+++ b/src/components/login_form/login_form.js
@@ -29,17 +29,18 @@ const LoginForm = {
app,
instance: data.instance,
username: this.user.username,
- password: this.user.password})
- .then((result) => {
- if (result.error) {
- this.authError = result.error
- this.user.password = ''
- return
- }
- this.$store.commit('setToken', result.access_token)
- this.$store.dispatch('loginUser', result.access_token)
- this.$router.push({name: 'friends'})
- })
+ password: this.user.password
+ }
+ ).then((result) => {
+ if (result.error) {
+ this.authError = result.error
+ this.user.password = ''
+ return
+ }
+ this.$store.commit('setToken', result.access_token)
+ this.$store.dispatch('loginUser', result.access_token)
+ this.$router.push({name: 'friends'})
+ })
})
},
clearError () {
diff --git a/src/components/login_form/login_form.vue b/src/components/login_form/login_form.vue
index b6a15776..27a8e48a 100644
--- a/src/components/login_form/login_form.vue
+++ b/src/components/login_form/login_form.vue
@@ -33,6 +33,7 @@
</div>
</div>
</form>
+
<div v-if="authError" class='form-group'>
<div class='alert error'>
{{authError}}