Add basic services; Base layout
This commit is contained in:
parent
be6467cd2c
commit
ef526cd2db
30 changed files with 291 additions and 34 deletions
18
src/api/auth/auth.ts
Normal file
18
src/api/auth/auth.ts
Normal 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 };
|
||||
Loading…
Add table
Add a link
Reference in a new issue