wip: planning-slot test

This commit is contained in:
2026-10-16 05:20:52 +02:00
parent 2f8fdb755b
commit 89fb745e74
20 changed files with 849 additions and 17 deletions
+8 -1
View File
@@ -3,7 +3,8 @@ from typing import List
from ninja import Router
from .models import Game
from .schemas import GameOut, SteamGameOut
from .schemas import GameOut, PlanningSlotOut, SteamGameOut
from .services.planning import planning_with_games
from .tasks import schedule_steam_refresh
router = Router()
@@ -28,3 +29,9 @@ def list_event_steam_games(request, event_path: str):
return Game.objects.enabled_for_event(request.event).filter(
steam_app_id__isnull=False
)
@event_router.get("/events/{event_path}/planning", response=List[PlanningSlotOut])
def list_event_planning(request, event_path: str):
"""The event planning, with the covers of the games we know."""
return planning_with_games(request.event.planning_slots.all())