@@ -226,7 +226,6 @@ import { studentProfileSchema, studentResetPasswordSchema } from '@/features/stu
|
||||
import {
|
||||
authKeys,
|
||||
useGetMeQuery,
|
||||
useResetPasswordMutation,
|
||||
useUpdateProfileMutation,
|
||||
useUploadMediaMutation,
|
||||
} from '@/services/query/auth'
|
||||
@@ -339,7 +338,7 @@ const onAvatarCropped = async (file) => {
|
||||
const onAvatarError = (msg) => toast.error(msg)
|
||||
|
||||
const updateMutation = useUpdateProfileMutation()
|
||||
const resetPasswordMutation = useResetPasswordMutation()
|
||||
const resetPasswordMutation = useUpdateProfileMutation()
|
||||
|
||||
const onSubmit = async () => {
|
||||
const { isValid, payload } = await validate(form.value)
|
||||
@@ -369,7 +368,10 @@ const onResetPassword = async () => {
|
||||
})
|
||||
if (!isValid) return
|
||||
try {
|
||||
await resetPasswordMutation.mutateAsync(payload)
|
||||
await resetPasswordMutation.mutateAsync({
|
||||
password: payload.password,
|
||||
passwordConfirmation: payload.passwordConfirmation,
|
||||
})
|
||||
passwordForm.value.password = ''
|
||||
passwordForm.value.passwordConfirmation = ''
|
||||
resetPasswordErrors()
|
||||
|
||||
Reference in New Issue
Block a user