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:
parent
d67240d449
commit
00a8fdda41
147 changed files with 3845 additions and 743 deletions
16
frontend/types/api.ts
Normal file
16
frontend/types/api.ts
Normal 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>>;
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue