From 4d3907b86a714c63d4a09c7d03d7f0e7b97b1b85 Mon Sep 17 00:00:00 2001 From: shpuld Date: Mon, 28 Jan 2019 17:48:00 +0200 Subject: [PATCH] Formatting --- src/components/login_form/login_form.js | 23 ++++++++++++----------- src/components/login_form/login_form.vue | 1 + 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 @@ +
{{authError}}