Fix 2329 in the frontend

This commit is contained in:
roschaefer 2019-11-22 15:08:25 +01:00
parent e9dcfd04fd
commit 145b6727b1

View File

@ -73,6 +73,7 @@
<script>
import LocaleSwitch from '~/components/LocaleSwitch/LocaleSwitch.vue'
import { normalizeEmail } from 'validator'
export default {
components: {
@ -93,8 +94,10 @@ export default {
},
methods: {
async onSubmit() {
let { email, password } = this.form
email = normalizeEmail(email)
try {
await this.$store.dispatch('auth/login', { ...this.form })
await this.$store.dispatch('auth/login', { email, password })
this.$toast.success(this.$t('login.success'))
this.$emit('success')
} catch (err) {