Skip to content

Commit

Permalink
Add session list test endpoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
sei-jvessella committed Feb 5, 2024
1 parent cb17e31 commit 364bed1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gamebrain/test_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 364bed1

Please sign in to comment.