diff --git a/api/advent22_api/core/config.py b/api/advent22_api/core/config.py index c99a017..97ccbf8 100644 --- a/api/advent22_api/core/config.py +++ b/api/advent22_api/core/config.py @@ -25,6 +25,9 @@ class Server(BaseModel): class Puzzle(BaseModel): + # Titel + title: str + # Lösungswort solution: str diff --git a/api/advent22_api/routers/admin.py b/api/advent22_api/routers/admin.py index e46ce7d..387a5b0 100644 --- a/api/advent22_api/routers/admin.py +++ b/api/advent22_api/routers/admin.py @@ -21,6 +21,7 @@ async def is_admin( class ConfigModel(BaseModel): class __Puzzle(BaseModel): + title: str solution: str begin: date end: date @@ -64,6 +65,7 @@ async def get_config_model( return ConfigModel.model_validate( { "puzzle": { + "title": cfg.puzzle.title, "solution": cfg.puzzle.solution, "begin": date.today(), # TODO "end": date.today(), # TODO diff --git a/ui/src/components/ConfigView.vue b/ui/src/components/ConfigView.vue index 6a1bb5f..eeb6e22 100644 --- a/ui/src/components/ConfigView.vue +++ b/ui/src/components/ConfigView.vue @@ -12,8 +12,7 @@