feature/get-places-api #2

Merged
behnam merged 26 commits from feature/get-places-api into develop 2023-05-23 09:23:56 +00:00
Showing only changes of commit bc1d5fe198 - Show all commits

View File

@ -0,0 +1,27 @@
import { apiUrls } from '~/driven/utils/configs/appConfig';
import { HttpOptionsType } from '~/driven/boundaries/http-boundary/protocols';
import { HTTPPovider } from '~/driven/boundaries/http-boundary/httpBoundary';
import { IOtpAuthDrivenPort } from '~/business-logic/generic/admin-user/authentication/otp-auth/port';
import { OtpAuthResponse } from '~/business-logic/generic/admin-user/authentication/otp-auth/data/reponse-object/otpAuthRO';
import { OtpAuthDTOReturnType } from '~/business-logic/generic/admin-user/authentication/otp-auth/data/dto/otpAuthDto';
const authAdminLogin = (): IOtpAuthDrivenPort => {
const httpProvider = new HTTPPovider();
const httpHandler = (data: OtpAuthDTOReturnType): Promise<OtpAuthResponse> => {
const url = apiUrls.generic.authLogin;
const options: HttpOptionsType = {
url,
headers: {
'Content-Type': 'application/json',
},
data,
};
return httpProvider.request<OtpAuthResponse>(options);
};
return {
httpHandler,
};
};
export default authAdminLogin;