diff --git a/api/advent22_api/routers/admin.py b/api/advent22_api/routers/admin.py index 7104f03..478cd74 100644 --- a/api/advent22_api/routers/admin.py +++ b/api/advent22_api/routers/admin.py @@ -93,35 +93,28 @@ async def get_config_model( ) -class DayStrModel(BaseModel): - day: int - value: str - - @router.get("/day_parts") async def get_day_parts( _: None = Depends(require_admin), parts: dict[int, str] = Depends(get_all_parts), -) -> list[DayStrModel]: +) -> dict[int, str]: """ Zuordnung der Lösungsteile zu den Tagen """ - return [DayStrModel(day=day, value=part) for day, part in sorted(parts.items())] + return parts @router.get("/day_image_names") async def get_day_image_names( _: None = Depends(require_admin), image_names: dict[int, str] = Depends(get_all_image_names), -) -> list[DayStrModel]: +) -> dict[int, str]: """ Zuordnung der verwendeten Bilder zu den Tagen """ - return [ - DayStrModel(day=day, value=name) for day, name in sorted(image_names.items()) - ] + return image_names @router.get("/doors") diff --git a/ui/src/components/admin/CalendarAssistant.vue b/ui/src/components/admin/CalendarAssistant.vue index b053bb9..d599b1b 100644 --- a/ui/src/components/admin/CalendarAssistant.vue +++ b/ui/src/components/admin/CalendarAssistant.vue @@ -46,7 +46,7 @@