mealie/frontend/api/class-interfaces/group-mealplan-rules.ts
2022-05-21 11:22:02 -08:00

14 lines
425 B
TypeScript

import { BaseCRUDAPI } from "../_base";
import { PlanRulesCreate, PlanRulesOut } from "~/types/api-types/meal-plan";
const prefix = "/api";
const routes = {
rule: `${prefix}/groups/mealplans/rules`,
ruleId: (id: string | number) => `${prefix}/groups/mealplans/rules/${id}`,
};
export class MealPlanRulesApi extends BaseCRUDAPI<PlanRulesCreate, PlanRulesOut> {
baseRoute = routes.rule;
itemRoute = routes.ruleId;
}