Add subcription feature 5
This commit is contained in:
@@ -160,11 +160,20 @@ export const useChangePassword = (
|
||||
});
|
||||
};
|
||||
|
||||
export const useResetPassword = (
|
||||
options?: UseMutationOptions<{ message: string }, ApiError, PasswordReset>
|
||||
export const useRequestPasswordReset = (
|
||||
options?: UseMutationOptions<{ message: string }, ApiError, string>
|
||||
) => {
|
||||
return useMutation<{ message: string }, ApiError, PasswordReset>({
|
||||
mutationFn: (resetData: PasswordReset) => authService.resetPassword(resetData),
|
||||
return useMutation<{ message: string }, ApiError, string>({
|
||||
mutationFn: (email: string) => authService.requestPasswordReset(email),
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
export const useResetPasswordWithToken = (
|
||||
options?: UseMutationOptions<{ message: string }, ApiError, { token: string; newPassword: string }>
|
||||
) => {
|
||||
return useMutation<{ message: string }, ApiError, { token: string; newPassword: string }>({
|
||||
mutationFn: ({ token, newPassword }) => authService.resetPasswordWithToken(token, newPassword),
|
||||
...options,
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user