1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-07-24 15:49:42 +02:00

refactor(frontend): 🚧 Add group/user CRUD support for admins

This commit is contained in:
hay-kot 2021-08-06 16:28:12 -08:00
parent 917177da5b
commit 695d7e96ae
46 changed files with 2015 additions and 102 deletions

View file

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