feat: login and register, otp verify api calls added
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import type { ApiResponse } from '@/types/apiResponse';
|
||||
import type { FetchPromise } from '@/types/fetchPromise';
|
||||
import type {
|
||||
CompleteUserInformationRequest,
|
||||
ConfirmEmailOtpRequest,
|
||||
ConfirmForgetPassCodeRequest,
|
||||
ConfirmOtpResponse,
|
||||
@@ -18,7 +19,7 @@ import type {
|
||||
SendSmsOtpRequest,
|
||||
} from '../types/userTypes';
|
||||
|
||||
const API_URL = 'https://account.business-harmony.com/api/';
|
||||
const API_URL = 'https://account.business-harmony.com/api';
|
||||
|
||||
export const fetchRequest = <T = ApiResponse>(
|
||||
url: string,
|
||||
@@ -91,6 +92,12 @@ export const loginOrSignUpWithGoogle = async (
|
||||
);
|
||||
};
|
||||
|
||||
export const completeUserInformation = async (
|
||||
body: CompleteUserInformationRequest,
|
||||
) => {
|
||||
return fetchRequest<ApiResponse>('User/CompleteUserInformation', body);
|
||||
};
|
||||
|
||||
export const logOut = async () => {
|
||||
return fetchRequest<ApiResponse>('User/LogOut', {});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user