mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Fix 2329 in the frontend
This commit is contained in:
parent
e9dcfd04fd
commit
145b6727b1
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user