Add basic services; Base layout

This commit is contained in:
Aslan 2026-01-01 17:21:56 +01:00
parent be6467cd2c
commit ef526cd2db
30 changed files with 291 additions and 34 deletions

18
src/api/auth/auth.ts Normal file
View file

@ -0,0 +1,18 @@
import { callApi, HTTP } from "../tools";
import {
IFetchLoginRequest,
IFetchLoginResponse,
IFetchRefreshResponse,
} from "./types";
const fetchLoginApi = async (
request: IFetchLoginRequest,
): Promise<IFetchLoginResponse> => {
return await callApi(HTTP.POST, `auth/login`, request);
};
const fetchRefreshApi = async (): Promise<IFetchRefreshResponse> => {
return await callApi(HTTP.GET_REFRESH, `auth/refresh`);
};
export { fetchLoginApi, fetchRefreshApi };