mirror of
https://code.lenaisten.de/Lenaisten/advent22.git
synced 2024-11-23 00:03:07 +00:00
minor renames
This commit is contained in:
parent
8290925659
commit
0550621835
2 changed files with 10 additions and 10 deletions
|
@ -11,7 +11,7 @@ from .helpers import Random, list_images_auto, load_image, set_len
|
|||
from .webdav import WebDAV
|
||||
|
||||
|
||||
async def get_days(
|
||||
async def get_all_days(
|
||||
cal_cfg: CalendarConfig = Depends(get_calendar_config),
|
||||
) -> list[int]:
|
||||
"""
|
||||
|
@ -21,9 +21,9 @@ async def get_days(
|
|||
return sorted(set(door.day for door in cal_cfg.doors))
|
||||
|
||||
|
||||
async def get_parts(
|
||||
async def get_all_parts(
|
||||
cfg: Config = Depends(get_config),
|
||||
days: list[int] = Depends(get_days),
|
||||
days: list[int] = Depends(get_all_days),
|
||||
) -> dict[int, str]:
|
||||
"""
|
||||
Lösung auf vorhandene Tage aufteilen
|
||||
|
@ -48,7 +48,7 @@ async def get_parts(
|
|||
|
||||
async def get_day_part(
|
||||
day: int,
|
||||
parts: dict[int, str] = Depends(get_parts),
|
||||
parts: dict[int, str] = Depends(get_all_parts),
|
||||
) -> str:
|
||||
"""
|
||||
Heute angezeigter Teil der Lösung
|
||||
|
@ -57,8 +57,8 @@ async def get_day_part(
|
|||
return parts[day]
|
||||
|
||||
|
||||
async def get_auto_image_names(
|
||||
days: list[int] = Depends(get_days),
|
||||
async def get_all_auto_image_names(
|
||||
days: list[int] = Depends(get_all_days),
|
||||
images: list[str] = Depends(list_images_auto),
|
||||
) -> dict[int, str]:
|
||||
"""
|
||||
|
@ -74,7 +74,7 @@ async def get_auto_image_names(
|
|||
async def gen_day_auto_image(
|
||||
day: int,
|
||||
cfg: Config = Depends(get_config),
|
||||
auto_image_names: list[str] = Depends(get_auto_image_names),
|
||||
auto_image_names: list[str] = Depends(get_all_auto_image_names),
|
||||
day_part: str = Depends(get_day_part),
|
||||
) -> Image.Image:
|
||||
"""
|
||||
|
@ -106,7 +106,7 @@ async def gen_day_auto_image(
|
|||
async def get_day_image(
|
||||
day: int,
|
||||
cfg: Config = Depends(get_config),
|
||||
auto_image_names: list[str] = Depends(get_auto_image_names),
|
||||
auto_image_names: list[str] = Depends(get_all_auto_image_names),
|
||||
day_part: str = Depends(get_day_part),
|
||||
) -> Image.Image:
|
||||
"""
|
||||
|
|
|
@ -5,7 +5,7 @@ from pydantic import BaseModel
|
|||
|
||||
from ..core.calendar_config import CalendarConfig, DoorsSaved, get_calendar_config
|
||||
from ..core.config import Config, get_config
|
||||
from ..core.depends import get_parts
|
||||
from ..core.depends import get_all_parts
|
||||
from ..core.settings import SETTINGS
|
||||
from ._security import require_admin, user_is_admin
|
||||
|
||||
|
@ -96,7 +96,7 @@ class DayStrModel(BaseModel):
|
|||
@router.get("/day_parts")
|
||||
async def get_day_parts(
|
||||
_: None = Depends(require_admin),
|
||||
parts: dict[int, str] = Depends(get_parts),
|
||||
parts: dict[int, str] = Depends(get_all_parts),
|
||||
) -> list[DayStrModel]:
|
||||
"""
|
||||
Zuordnung der Lösungsteile zu den Tagen
|
||||
|
|
Loading…
Reference in a new issue