diff --git a/api/advent22_api/core/depends.py b/api/advent22_api/core/depends.py index 90f58cf..050785c 100644 --- a/api/advent22_api/core/depends.py +++ b/api/advent22_api/core/depends.py @@ -12,7 +12,7 @@ from .helpers import EventDays, Random, list_images_auto, load_image, set_len from .webdav import WebDAV -async def get_all_days( +async def get_all_sorted_days( cal_cfg: CalendarConfig = Depends(get_calendar_config), ) -> list[int]: """ @@ -23,7 +23,7 @@ async def get_all_days( async def get_all_event_days( - days: list[int] = Depends(get_all_days), + days: list[int] = Depends(get_all_sorted_days), ) -> EventDays: """ Aktueller Kalender-Zeitraum @@ -31,7 +31,7 @@ async def get_all_event_days( return EventDays.get( today=date.today(), - begin_month=12, + begin_month=9, begin_day=1, events_after=[day - 1 for day in days], closing_after=90, @@ -40,7 +40,7 @@ async def get_all_event_days( async def get_all_parts( cfg: Config = Depends(get_config), - days: list[int] = Depends(get_all_days), + days: list[int] = Depends(get_all_sorted_days), ) -> dict[int, str]: """ Lösung auf vorhandene Tage aufteilen @@ -68,7 +68,7 @@ async def get_all_parts( async def get_all_auto_image_names( - days: list[int] = Depends(get_all_days), + days: list[int] = Depends(get_all_sorted_days), images: list[str] = Depends(list_images_auto), ) -> dict[int, str]: """ diff --git a/api/advent22_api/core/helpers.py b/api/advent22_api/core/helpers.py index 97228aa..6cf02f1 100644 --- a/api/advent22_api/core/helpers.py +++ b/api/advent22_api/core/helpers.py @@ -79,7 +79,7 @@ class EventDays(BaseModel): - `first`: Datum des ersten Ereignisses - `next`: Datum des nächsten Ereignisses - `last`: Datum des letzten Ereignisses - - `end`: Letztes Datum Ereigniszeitraums + - `end`: Letztes Datum des Ereigniszeitraums """ first: date diff --git a/api/advent22_api/routers/admin.py b/api/advent22_api/routers/admin.py index 5edc8ab..73021f1 100644 --- a/api/advent22_api/routers/admin.py +++ b/api/advent22_api/routers/admin.py @@ -82,7 +82,7 @@ async def get_config_model( "image": { "size": 500, # TODO "border": 30, # TODO - "fonts": [{"file": cfg.server.font, "size": 50}], + "fonts": [{"file": cfg.server.font, "size": 50}], # TODO }, "webdav": { "url": SETTINGS.webdav.url,