mealie/frontend/lib/api/user/group-mealplan-rules.ts
2024-08-22 10:14:32 -05:00

15 lines
443 B
TypeScript

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