Initial commit of mtgonline project

This commit is contained in:
2026-07-18 04:57:40 +00:00
commit 86c12376f8
1870 changed files with 547994 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
"""WebSocket router for game connections."""
from fastapi import APIRouter, WebSocket, WebSocketDisconnect, Query
from typing import Optional
from app.services.game_server import game_websocket_endpoint
router = APIRouter()
@router.websocket("/ws/game/{game_id}")
async def game_websocket(
websocket: WebSocket,
game_id: int,
player_id: Optional[int] = None,
):
"""WebSocket endpoint for game connections."""
await websocket.accept()
await game_websocket_endpoint(websocket, game_id)