modified: main_dc/yalarba/easySite/easySite/app/pages/auth/register.vue
fix bag with incompatable genericObject in RegisterFrom <=> values
This commit is contained in:
@@ -88,6 +88,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useField, useForm } from 'vee-validate'
|
import { useField, useForm } from 'vee-validate'
|
||||||
import { registerSchema } from '~/schemas/auth'
|
import { registerSchema } from '~/schemas/auth'
|
||||||
|
import type { RegisterForm } from '~/types/auth'
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
middleware: 'auth',
|
middleware: 'auth',
|
||||||
@@ -107,7 +108,7 @@ const { value: passwordConfirm } = useField('passwordConfirm')
|
|||||||
|
|
||||||
const onSubmit = handleSubmit(async (values) => {
|
const onSubmit = handleSubmit(async (values) => {
|
||||||
try {
|
try {
|
||||||
await auth.register(values)
|
await auth.register(values as RegisterForm)
|
||||||
await navigateTo('/profile')
|
await navigateTo('/profile')
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
|
|||||||
Reference in New Issue
Block a user