From d5d99caeb2dba774ad25e3cf46606b21a7b1b3d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Mon, 11 Sep 2023 22:14:33 +0000 Subject: [PATCH] cfg.puzzle.random_pepper -> cfg.puzzle.random_seed --- api/advent22_api/core/config.py | 2 +- api/advent22_api/core/sequence_helpers.py | 2 +- api/advent22_api/routers/admin.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/advent22_api/core/config.py b/api/advent22_api/core/config.py index d737860..c99a017 100644 --- a/api/advent22_api/core/config.py +++ b/api/advent22_api/core/config.py @@ -36,7 +36,7 @@ class Puzzle(BaseModel): calendar: str = "default.toml" # Serverseitiger zusätzlicher "random" seed - random_pepper: str = "" + random_seed: str = "" class Config(BaseModel): diff --git a/api/advent22_api/core/sequence_helpers.py b/api/advent22_api/core/sequence_helpers.py index 27fa454..a4911d0 100644 --- a/api/advent22_api/core/sequence_helpers.py +++ b/api/advent22_api/core/sequence_helpers.py @@ -9,7 +9,7 @@ class Random(random.Random): @classmethod async def get(cls, bonus_salt: Any = "") -> Self: cfg = await get_config() - return cls(f"{cfg.puzzle.solution}{cfg.puzzle.random_pepper}{bonus_salt}") + return cls(f"{cfg.puzzle.solution}{cfg.puzzle.random_seed}{bonus_salt}") async def shuffle(seq: Sequence, rnd: random.Random | None = None) -> list: diff --git a/api/advent22_api/routers/admin.py b/api/advent22_api/routers/admin.py index 131b910..cda823b 100644 --- a/api/advent22_api/routers/admin.py +++ b/api/advent22_api/routers/admin.py @@ -69,7 +69,7 @@ async def get_private_config( begin=date.today(), end=date.today(), closing=date.today(), - seed=cfg.puzzle.random_pepper, + seed=cfg.puzzle.random_seed, ), calendar=PrivateCalendar( config_file=cfg.puzzle.calendar,