diff options
| author | shpuld <shp@cock.li> | 2019-01-28 17:48:00 +0200 |
|---|---|---|
| committer | shpuld <shp@cock.li> | 2019-01-28 17:48:00 +0200 |
| commit | 4d3907b86a714c63d4a09c7d03d7f0e7b97b1b85 (patch) | |
| tree | eca0f2e7ff2d1b6e927a75ab4ebb0e3aa2d85130 /src/components | |
| parent | 1b76a5a9eabf9e33daf83ae398295ef199607695 (diff) | |
Formatting
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/login_form/login_form.js | 23 | ||||
| -rw-r--r-- | 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 @@ </div> </div> </form> + <div v-if="authError" class='form-group'> <div class='alert error'> {{authError}} |
