1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-23 07:09:41 +02:00

reorganize all frontend items

This commit is contained in:
hay-kot 2021-08-01 19:24:47 -08:00
parent d67240d449
commit 00a8fdda41
147 changed files with 3845 additions and 743 deletions

16
frontend/types/api.ts Normal file
View file

@ -0,0 +1,16 @@
import { AxiosResponse } from "axios";
interface RequestResponse<T> {
response: AxiosResponse<T> | null;
data: T | null;
error: any;
}
export interface ApiRequestInstance {
get<T>(url: string, data?: object): Promise<RequestResponse<T>>;
post<T>(url: string, data: object): Promise<RequestResponse<T>>;
put<T>(url: string, data: object): Promise<RequestResponse<T>>;
patch<T>(url: string, data: object): Promise<RequestResponse<T>>;
delete<T>(url: string, data: object): Promise<RequestResponse<T>>;
}