Fix recipe list links and home page recipe count

- Template used recipe.id but service returns recipe.recipe_id
- Add recipe count to home page stats

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
gilesb
2026-01-11 17:26:00 +00:00
parent a6fe88c277
commit 3373be285e
2 changed files with 9 additions and 1 deletions

View File

@@ -40,6 +40,14 @@ async def home(request: Request):
stats["media"] = await database.count_user_items(user.actor_id)
except Exception:
pass
try:
from ..services.recipe_service import RecipeService
from ..dependencies import get_redis_client, get_cache_manager
recipe_service = RecipeService(get_redis_client(), get_cache_manager())
recipes = await recipe_service.list_recipes(user.actor_id)
stats["recipes"] = len(recipes)
except Exception:
pass
templates = get_templates(request)
return render(templates, "home.html", request,