From 364bed1cbda3330cef32411b7cd80823d4fa3ccd Mon Sep 17 00:00:00 2001 From: Joe Vessella Date: Mon, 5 Feb 2024 19:42:05 +0000 Subject: [PATCH] Add session list test endpoint. --- gamebrain/test_endpoints.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gamebrain/test_endpoints.py b/gamebrain/test_endpoints.py index 5e22bba..2f28bc4 100644 --- a/gamebrain/test_endpoints.py +++ b/gamebrain/test_endpoints.py @@ -41,6 +41,7 @@ from .auth import admin_api_key_dependency from .config import get_settings, SettingsModel from .clients import topomojo +from .db import get_active_game_sessions from .gamedata.cache import ( GameDataCacheSnapshot, GameStateManager, @@ -250,6 +251,11 @@ async def _reload_state_from_file(file: TextIO | BinaryIO): await GameStateManager.init(new_state, GameStateManager._settings) +@test_router.get("/sessions") +async def list_sessions(): + return await get_active_game_sessions() + + @test_router.get("/end_team_game/{team_id}") async def end_team_game(team_id: str): await cleanup_team(team_id)