mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-02 20:15:24 +02:00
feat(frontend): 🚧 CRUD Functionality
This commit is contained in:
parent
00a8fdda41
commit
afcad2f701
49 changed files with 845 additions and 275 deletions
|
@ -62,8 +62,8 @@ export interface RecipeCategoryResponse {
|
|||
}
|
||||
export interface Recipe {
|
||||
id?: number;
|
||||
name?: string;
|
||||
slug?: string;
|
||||
name: string;
|
||||
slug: string;
|
||||
image?: unknown;
|
||||
description?: string;
|
||||
recipeCategory?: string[];
|
||||
|
|
|
@ -49,8 +49,8 @@ export interface Nutrition {
|
|||
}
|
||||
export interface Recipe {
|
||||
id?: number;
|
||||
name?: string;
|
||||
slug?: string;
|
||||
name: string;
|
||||
slug: string;
|
||||
image?: unknown;
|
||||
description?: string;
|
||||
recipeCategory?: string[];
|
||||
|
|
|
@ -7,10 +7,10 @@ interface RequestResponse<T> {
|
|||
}
|
||||
|
||||
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>>;
|
||||
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>>;
|
||||
}
|
||||
|
||||
|
|
8
frontend/types/ts-shim.d.ts
vendored
Normal file
8
frontend/types/ts-shim.d.ts
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
declare module "*.vue" {
|
||||
import Vue from "vue"
|
||||
export default Vue
|
||||
}
|
||||
|
||||
interface VForm extends HTMLFormElement {
|
||||
validate(): boolean;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue