diff --git a/app/routers/home.py b/app/routers/home.py index ad0aeeb..c421f37 100644 --- a/app/routers/home.py +++ b/app/routers/home.py @@ -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, diff --git a/app/templates/recipes/list.html b/app/templates/recipes/list.html index feef25d..b593dc4 100644 --- a/app/templates/recipes/list.html +++ b/app/templates/recipes/list.html @@ -15,7 +15,7 @@ {% if recipes %}
{% for recipe in recipes %} -
{{ recipe.name }}