diff --git a/api/advent22_api/routers/admin.py b/api/advent22_api/routers/admin.py index dd90ce6..59c4fbb 100644 --- a/api/advent22_api/routers/admin.py +++ b/api/advent22_api/routers/admin.py @@ -85,20 +85,21 @@ async def get_config_model( ) -class DayPartModel(BaseModel): +class DayStrModel(BaseModel): day: int - part: str + value: str @router.get("/day_parts") async def get_day_parts( _: None = Depends(require_admin), parts: dict[int, str] = Depends(get_parts), -) -> list[DayPartModel]: - return [ - DayPartModel.model_validate({"day": day, "part": part}) - for day, part in sorted(parts.items()) - ] +) -> list[DayStrModel]: + """ + Zuordnung der Lösungsteile zu den Tagen + """ + + return [DayStrModel(day=day, value=part) for day, part in sorted(parts.items())] @router.get("/doors") diff --git a/ui/src/components/CalendarAssistant.vue b/ui/src/components/CalendarAssistant.vue index 2a35996..2221837 100644 --- a/ui/src/components/CalendarAssistant.vue +++ b/ui/src/components/CalendarAssistant.vue @@ -28,7 +28,7 @@ :key="`part-${index}`" class="tag is-info" > - {{ day_part.day }}: {{ day_part.part.split("").join(", ") }} + {{ day_part.day }}: {{ day_part.value.split("").join(", ") }} @@ -50,7 +50,7 @@