From e9ef7f67e30977d6f21b1c712ef473ea172e600c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Thu, 14 Sep 2023 15:00:34 +0000 Subject: [PATCH] remove public puzzle.title from private ConfigModel --- api/advent22_api/routers/admin.py | 2 -- ui/src/components/admin/ConfigView.vue | 4 ++-- ui/src/lib/api.ts | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/api/advent22_api/routers/admin.py b/api/advent22_api/routers/admin.py index aabccbf..5601c91 100644 --- a/api/advent22_api/routers/admin.py +++ b/api/advent22_api/routers/admin.py @@ -21,7 +21,6 @@ async def is_admin( class ConfigModel(BaseModel): class __Puzzle(BaseModel): - title: str solution: str begin: date end: date @@ -65,7 +64,6 @@ 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/admin/ConfigView.vue b/ui/src/components/admin/ConfigView.vue index b0db1fa..9b2b5fa 100644 --- a/ui/src/components/admin/ConfigView.vue +++ b/ui/src/components/admin/ConfigView.vue @@ -7,7 +7,8 @@

Rätsel

Titel
-
{{ config_model.puzzle.title }}
+ +
Advent22
Lösung
{{ config_model.puzzle.solution }}
@@ -140,7 +141,6 @@ interface Credentials { export default class extends Vue { public config_model: ConfigModel = { puzzle: { - title: "Advent22", solution: "ABCDEFGHIJKLMNOPQRSTUVWX", begin: "01.12.2023", end: "24.12.2023", diff --git a/ui/src/lib/api.ts b/ui/src/lib/api.ts index 63717b2..2ce8b46 100644 --- a/ui/src/lib/api.ts +++ b/ui/src/lib/api.ts @@ -1,6 +1,5 @@ export interface ConfigModel { puzzle: { - title: string; solution: string; begin: string; end: string;