mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-08-05 13:35:23 +02:00
feature/multi-tenancy and move caddy server (#980)
* update to GUIDs * fix cookbook id relationships * update webhook keys * cleanup naming and attribute orders * remove old database tables * fix meal-plan images * remove dashbaord and events api * use recipe-id instead of id * cleanup documentation assets * cleanup docs for v1 beta-release * add depends_on for docker-compose * use docker volumes for examples * move caddy to frontend container
This commit is contained in:
parent
14cc541f7a
commit
602f248541
91 changed files with 187 additions and 1170 deletions
|
@ -1,49 +0,0 @@
|
|||
import { BaseAPI } from "../_base";
|
||||
|
||||
export type EventCategory = "general" | "recipe" | "backup" | "scheduled" | "migration" | "group" | "user";
|
||||
|
||||
export interface Event {
|
||||
id?: number;
|
||||
title: string;
|
||||
text: string;
|
||||
timeStamp?: string;
|
||||
category?: EventCategory & string;
|
||||
}
|
||||
|
||||
export interface EventsOut {
|
||||
total: number;
|
||||
events: Event[];
|
||||
}
|
||||
|
||||
const prefix = "/api";
|
||||
|
||||
const routes = {
|
||||
aboutEvents: `${prefix}/about/events`,
|
||||
aboutEventsNotifications: `${prefix}/about/events/notifications`,
|
||||
aboutEventsNotificationsTest: `${prefix}/about/events/notifications/test`,
|
||||
|
||||
aboutEventsId: (id: number) => `${prefix}/about/events/${id}`,
|
||||
aboutEventsNotificationsId: (id: number) => `${prefix}/about/events/notifications/${id}`,
|
||||
};
|
||||
|
||||
export class EventsAPI extends BaseAPI {
|
||||
/** Get event from the Database
|
||||
*/
|
||||
async getEvents() {
|
||||
return await this.requests.get<EventsOut>(routes.aboutEvents);
|
||||
}
|
||||
|
||||
/** Get event from the Database
|
||||
*/
|
||||
async deleteEvents() {
|
||||
return await this.requests.delete(routes.aboutEvents);
|
||||
}
|
||||
|
||||
/** Delete event from the Database
|
||||
*/
|
||||
async deleteEvent(id: number) {
|
||||
return await this.requests.delete(routes.aboutEventsId(id));
|
||||
}
|
||||
/** Get all event_notification from the Database
|
||||
*/
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
import { RecipeAPI } from "./class-interfaces/recipes";
|
||||
import { UserApi } from "./class-interfaces/users";
|
||||
import { GroupAPI } from "./class-interfaces/groups";
|
||||
import { EventsAPI } from "./class-interfaces/events";
|
||||
import { BackupAPI } from "./class-interfaces/backups";
|
||||
import { UploadFile } from "./class-interfaces/upload";
|
||||
import { CategoriesAPI } from "./class-interfaces/organizer-categories";
|
||||
|
@ -30,7 +29,6 @@ class Api {
|
|||
public recipes: RecipeAPI;
|
||||
public users: UserApi;
|
||||
public groups: GroupAPI;
|
||||
public events: EventsAPI;
|
||||
public backups: BackupAPI;
|
||||
public categories: CategoriesAPI;
|
||||
public tags: TagsAPI;
|
||||
|
@ -79,7 +77,6 @@ class Api {
|
|||
this.multiPurposeLabels = new MultiPurposeLabelsApi(requests);
|
||||
|
||||
// Admin
|
||||
this.events = new EventsAPI(requests);
|
||||
this.backups = new BackupAPI(requests);
|
||||
|
||||
// Utils
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue