From b73185e4fbf0c067958fd392ad234d3230ae5a31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Mon, 11 Sep 2023 23:47:07 +0000 Subject: [PATCH] remove "doors" from admin ConfigModel (is public) --- api/advent22_api/routers/admin.py | 2 -- ui/src/components/ConfigView.vue | 5 ++--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/api/advent22_api/routers/admin.py b/api/advent22_api/routers/admin.py index 41063e2..ddcdde3 100644 --- a/api/advent22_api/routers/admin.py +++ b/api/advent22_api/routers/admin.py @@ -31,7 +31,6 @@ class ConfigModel(BaseModel): class __Calendar(BaseModel): config_file: str background: str - doors: list[int] class __Image(BaseModel): class __Font(BaseModel): @@ -73,7 +72,6 @@ async def get_config_model( "calendar": { "config_file": cfg.puzzle.calendar, "background": cal_cfg.background, - "doors": [door.day for door in cal_cfg.doors], }, "image": { "size": 500, # TODO diff --git a/ui/src/components/ConfigView.vue b/ui/src/components/ConfigView.vue index afd8d8a..5cf05bd 100644 --- a/ui/src/components/ConfigView.vue +++ b/ui/src/components/ConfigView.vue @@ -49,7 +49,8 @@
Türchen
- {{ admin_config_model.calendar.doors.join(", ") }} + + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 @@ -133,7 +134,6 @@ interface ConfigModel { calendar: { config_file: string; background: string; - doors: number[]; }; image: { size: number; @@ -165,7 +165,6 @@ export default class extends Vue { calendar: { config_file: "default.toml", background: "adventskalender.jpg", - doors: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], }, image: { size: 500,