This commit is contained in:
hamid zarghami
2025-01-22 14:37:48 +03:30
parent ab441a593c
commit c349d1ce55
9 changed files with 275 additions and 56 deletions
+13
View File
@@ -1,9 +1,11 @@
import axios from "../../../config/axios";
import {
CheckHasAccountPhoneType,
CheckHasAccountType,
LoginWithOtpType,
LoginWithPasswordType,
OtpVerifyType,
RegisterType,
} from "../types/AuthTypes";
export const loginWithPassword = async (params: LoginWithPasswordType) => {
@@ -24,3 +26,14 @@ export const checkHasAccount = async (params: CheckHasAccountType) => {
const { data } = await axios.post(`/auth/check`, params);
return data;
};
export const checkHasAccountRegister = async (
params: CheckHasAccountPhoneType
) => {
const { data } = await axios.post(`/auth/register/initiate`, params);
return data;
};
export const register = async (params: RegisterType) => {
const { data } = await axios.post(`/auth/register/complete`, params);
return data;
};