2021-10-24 00:42:20 +00:00
|
|
|
import { BaseCRUDAPI } from "../_base";
|
2022-03-17 18:30:10 +00:00
|
|
|
import { CreateIngredientUnit, IngredientUnit } from "~/types/api-types/recipe";
|
2021-08-22 23:23:45 +00:00
|
|
|
|
|
|
|
const prefix = "/api";
|
|
|
|
|
|
|
|
const routes = {
|
|
|
|
unit: `${prefix}/units`,
|
|
|
|
unitsUnit: (tag: string) => `${prefix}/units/${tag}`,
|
|
|
|
};
|
|
|
|
|
2022-03-17 18:30:10 +00:00
|
|
|
export class UnitAPI extends BaseCRUDAPI<IngredientUnit, CreateIngredientUnit> {
|
2021-08-22 23:23:45 +00:00
|
|
|
baseRoute: string = routes.unit;
|
|
|
|
itemRoute = routes.unitsUnit;
|
|
|
|
}
|