api ulandi

This commit is contained in:
Samandar Turgunboyev
2025-10-25 18:42:01 +05:00
parent 1a08775451
commit 05b752daf2
84 changed files with 11179 additions and 3724 deletions

View File

@@ -0,0 +1,22 @@
import type { LoginData, MeData } from "@/shared/config/api/auth/auth.model";
import httpClient from "@/shared/config/api/httpClient";
import { AUTH_LOGIN, GET_ME } from "@/shared/config/api/URLs";
import type { AxiosResponse } from "axios";
const authLogin = async ({
phone,
password,
}: {
phone: string;
password: string;
}): Promise<AxiosResponse<LoginData>> => {
const response = await httpClient.post(AUTH_LOGIN, { phone, password });
return response;
};
const getMe = async (): Promise<AxiosResponse<MeData>> => {
const response = await httpClient.get(GET_ME);
return response;
};
export { authLogin, getMe };