From 3ab2a56172faa3faab1390d203ebe9fd6490fb42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Sat, 9 Sep 2023 21:41:30 +0000 Subject: [PATCH] get_visible_days with Depends() --- api/advent22_api/routers/days.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/advent22_api/routers/days.py b/api/advent22_api/routers/days.py index 20d9d80..ece8e87 100644 --- a/api/advent22_api/routers/days.py +++ b/api/advent22_api/routers/days.py @@ -31,12 +31,14 @@ async def get_date() -> str: @router.get("/visible_days") -async def get_visible_days() -> int: +async def get_visible_days( + visible_doors: int = Depends(user_visible_doors), +) -> int: """ Sichtbare Türchen """ - return await user_visible_doors() + return visible_doors @router.get("/part/{day}")