Add optional subtitle to recipes, display under title, omit from TOC

This commit is contained in:
2026-10-17 17:20:02 +02:00
parent 814fd54d75
commit f8e5525847
9 changed files with 223 additions and 11 deletions
+4
View File
@@ -580,6 +580,7 @@ def api_get_recipe(recipe_id: int):
@app.post("/api/recipes")
async def api_create_recipe(
title: str = Form(...),
subtitle: str = Form(""),
chapter_number: int = Form(...),
effort: str = Form("mittel"),
prep_time: str = Form(""),
@@ -604,6 +605,7 @@ async def api_create_recipe(
try:
recipe = add_recipe(
title=title,
subtitle=subtitle,
category=category_title,
chapter_number=chapter_number,
effort=effort,
@@ -636,6 +638,7 @@ async def api_create_recipe(
async def api_update_recipe(
recipe_id: int,
title: str = Form(...),
subtitle: Optional[str] = Form(None),
chapter_number: int = Form(...),
effort: str = Form("mittel"),
prep_time: str = Form(""),
@@ -661,6 +664,7 @@ async def api_update_recipe(
recipe = update_recipe(
recipe_id=recipe_id,
title=title,
subtitle=subtitle,
category=category_title,
chapter_number=chapter_number,
effort=effort,