mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-05-24 01:12:54 -04:00
19 lines
673 B
TypeScript
19 lines
673 B
TypeScript
import { BaseCRUDAPI } from "../_base";
|
|
import { GroupEventNotifierCreate, GroupEventNotifierOut, GroupEventNotifierUpdate } from "~/types/api-types/group";
|
|
|
|
const prefix = "/api";
|
|
|
|
const routes = {
|
|
eventNotifier: `${prefix}/groups/events/notifications`,
|
|
eventNotifierId: (id: string | number) => `${prefix}/groups/events/notifications/${id}`,
|
|
};
|
|
|
|
export class GroupEventNotifierApi extends BaseCRUDAPI<GroupEventNotifierCreate, GroupEventNotifierOut, GroupEventNotifierUpdate> {
|
|
baseRoute = routes.eventNotifier;
|
|
itemRoute = routes.eventNotifierId;
|
|
|
|
async test(itemId: string) {
|
|
return await this.requests.post(`${this.baseRoute}/${itemId}/test`, {});
|
|
}
|
|
}
|