mirror of
https://github.com/mealie-recipes/mealie.git
synced 2024-12-26 05:51:21 -08:00
15 lines
443 B
TypeScript
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;
|
|
}
|