Fix critical bug and deprecation warnings

- Fixed bug in games_router.py: player_result -> player_stmt in create_game
- Updated main.py lifespan from generator to @asynccontextmanager (FastAPI deprecation)
- security.py already uses datetime.now(timezone.utc) - no change needed
- All 28 tests pass
This commit is contained in:
2026-10-19 06:33:28 +00:00
parent 3926b57cf7
commit 1331885455
3 changed files with 11 additions and 12 deletions
+3 -2
View File
@@ -15,7 +15,7 @@ Mounts all consolidated routers and provides centralized configuration.
"""
import asyncio
import logging
from typing import AsyncGenerator
from contextlib import asynccontextmanager
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
@@ -36,7 +36,8 @@ from app.core.logging import configure_logging
logger = logging.getLogger(__name__)
def lifespan(app: FastAPI) -> AsyncGenerator[None, None]:
@asynccontextmanager
async def lifespan(app: FastAPI):
"""Application lifespan events for startup and shutdown."""
config = get_config()