mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-23 15:19:41 +02:00
Feature/user seedable foods (#1176)
* remove odd ingredients * UI Elements for food * update translated percentage * spek -> speck * generate types * seeder api endpoints + tests * implement foods seeder UI * localize some food strings
This commit is contained in:
parent
67178f9b74
commit
d6e2b4ab85
60 changed files with 478 additions and 172 deletions
26
frontend/api/class-interfaces/group-seeder.ts
Normal file
26
frontend/api/class-interfaces/group-seeder.ts
Normal file
|
@ -0,0 +1,26 @@
|
|||
import { BaseAPI } from "../_base";
|
||||
import { SuccessResponse } from "~/types/api-types/response";
|
||||
import { SeederConfig } from "~/types/api-types/group";
|
||||
|
||||
const prefix = "/api";
|
||||
|
||||
const routes = {
|
||||
base: `${prefix}/groups/seeders`,
|
||||
foods: `${prefix}/groups/seeders/foods`,
|
||||
units: `${prefix}/groups/seeders/units`,
|
||||
labels: `${prefix}/groups/seeders/labels`,
|
||||
};
|
||||
|
||||
export class GroupDataSeederApi extends BaseAPI {
|
||||
foods(payload: SeederConfig) {
|
||||
return this.requests.post<SuccessResponse>(routes.foods, payload);
|
||||
}
|
||||
|
||||
units(payload: SeederConfig) {
|
||||
return this.requests.post<SuccessResponse>(routes.units, payload);
|
||||
}
|
||||
|
||||
labels(payload: SeederConfig) {
|
||||
return this.requests.post<SuccessResponse>(routes.labels, payload);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue