mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-23 23:29:41 +02:00
feat(frontend): 🚧 groundwork for user interactive ingredient parsing
This commit is contained in:
parent
f8c2f760bd
commit
0f6f81eb27
5 changed files with 129 additions and 9 deletions
|
@ -10,6 +10,7 @@ const routes = {
|
|||
recipesCreateUrl: `${prefix}/recipes/create-url`,
|
||||
recipesCreateFromZip: `${prefix}/recipes/create-from-zip`,
|
||||
recipesCategory: `${prefix}/recipes/category`,
|
||||
recipesParseIngredients: `${prefix}/parse/ingredient`,
|
||||
|
||||
recipesRecipeSlug: (recipe_slug: string) => `${prefix}/recipes/${recipe_slug}`,
|
||||
recipesRecipeSlugZip: (recipe_slug: string) => `${prefix}/recipes/${recipe_slug}/zip`,
|
||||
|
@ -81,4 +82,8 @@ export class RecipeAPI extends BaseCRUDAPI<Recipe, CreateRecipe> {
|
|||
async deleteComment(slug: string, id: number) {
|
||||
return await this.requests.delete(routes.recipesSlugCommentsId(slug, id));
|
||||
}
|
||||
|
||||
async parseIngredients(ingredients: Array<string>) {
|
||||
return await this.requests.post(routes.recipesParseIngredients, { ingredients });
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue