mealie/frontend/lib/api/admin/admin-households.ts
Michael Genson 7c274de778
feat: Filter Recipes By Household (and a ton of bug fixes) (#4207)
Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
2024-09-22 14:59:20 +00:00

14 lines
513 B
TypeScript

import { BaseCRUDAPI } from "../base/base-clients";
import { HouseholdCreate, HouseholdInDB, UpdateHouseholdAdmin } from "~/lib/api/types/household";
const prefix = "/api";
const routes = {
adminHouseholds: `${prefix}/admin/households`,
adminHouseholdsId: (id: string) => `${prefix}/admin/households/${id}`,
};
export class AdminHouseholdsApi extends BaseCRUDAPI<HouseholdCreate, HouseholdInDB, UpdateHouseholdAdmin> {
baseRoute: string = routes.adminHouseholds;
itemRoute = routes.adminHouseholdsId;
}