mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-23 13:11:27 +10:00
release: v4.1.0
This commit is contained in:
@ -28,7 +28,8 @@ export const useLogin = () => {
|
||||
mutationFn: login,
|
||||
onSuccess: (data) => {
|
||||
if (data.status === "2fa_required") {
|
||||
return navigate("/auth/verify-otp");
|
||||
navigate("/auth/verify-otp");
|
||||
return;
|
||||
}
|
||||
|
||||
setUser(data.user);
|
||||
|
||||
@ -5,12 +5,10 @@ import { AxiosResponse } from "axios";
|
||||
import { axios } from "@/client/libs/axios";
|
||||
|
||||
export const forgotPassword = async (data: ForgotPasswordDto) => {
|
||||
const response = await axios.post<void, AxiosResponse<void>, ForgotPasswordDto>(
|
||||
return axios.post<undefined, AxiosResponse<undefined>, ForgotPasswordDto>(
|
||||
"/auth/forgot-password",
|
||||
data,
|
||||
);
|
||||
|
||||
return response.data;
|
||||
};
|
||||
|
||||
export const useForgotPassword = () => {
|
||||
|
||||
@ -5,12 +5,10 @@ import { AxiosResponse } from "axios";
|
||||
import { axios } from "@/client/libs/axios";
|
||||
|
||||
export const resetPassword = async (data: ResetPasswordDto) => {
|
||||
const response = await axios.post<void, AxiosResponse<void>, ResetPasswordDto>(
|
||||
return axios.post<undefined, AxiosResponse<undefined>, ResetPasswordDto>(
|
||||
"/auth/reset-password",
|
||||
data,
|
||||
);
|
||||
|
||||
return response.data;
|
||||
};
|
||||
|
||||
export const useResetPassword = () => {
|
||||
|
||||
Reference in New Issue
Block a user