login with fill otp

This commit is contained in:
hamid zarghami
2025-12-14 15:12:59 +03:30
parent adad5d4429
commit afa0bbf3fb
6 changed files with 27 additions and 8 deletions
+8 -2
View File
@@ -3,6 +3,7 @@ import {
type CheckHasAccountPhoneType,
type CheckHasAccountType,
type LoginWithOtpType,
type LoginWithOtpResponse,
type LoginWithPasswordType,
type OtpVerifyType,
type RefreshTokenType,
@@ -15,8 +16,13 @@ export const loginWithPassword = async (params: LoginWithPasswordType) => {
return data;
};
export const loginWithOtp = async (params: LoginWithOtpType) => {
const { data } = await axios.post(`/admin/auth/otp/request`, params);
export const loginWithOtp = async (
params: LoginWithOtpType
): Promise<LoginWithOtpResponse> => {
const { data } = await axios.post<LoginWithOtpResponse>(
`/admin/auth/otp/request`,
params
);
return data;
};