Restructure: Move 43 files into 8 domain packages (backend-lehrer)
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 27s
CI / test-go-edu-search (push) Successful in 40s
CI / test-python-klausur (push) Failing after 2m30s
CI / test-python-agent-core (push) Successful in 28s
CI / test-nodejs-website (push) Successful in 20s
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 27s
CI / test-go-edu-search (push) Successful in 40s
CI / test-python-klausur (push) Failing after 2m30s
CI / test-python-agent-core (push) Successful in 28s
CI / test-nodejs-website (push) Successful in 20s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
46
backend-lehrer/game/api.py
Normal file
46
backend-lehrer/game/api.py
Normal file
@@ -0,0 +1,46 @@
|
||||
# ==============================================
|
||||
# Breakpilot Drive - Game API (barrel re-export)
|
||||
# ==============================================
|
||||
# This module was split into:
|
||||
# - game_models.py (Pydantic models, difficulty mapping, sample questions)
|
||||
# - game_routes.py (Core game routes: level, quiz, session, leaderboard)
|
||||
# - game_extended_routes.py (Phase 5: achievements, progress, parent, class)
|
||||
#
|
||||
# The `router` object is assembled here by including all sub-routers.
|
||||
# Importers that did `from game_api import router` continue to work.
|
||||
|
||||
from fastapi import APIRouter
|
||||
|
||||
from .routes import router as _core_router
|
||||
from .session_routes import router as _session_router
|
||||
from .extended_routes import router as _extended_router
|
||||
|
||||
# Re-export models for any direct importers
|
||||
from .game_models import ( # noqa: F401
|
||||
LearningLevel,
|
||||
GameDifficulty,
|
||||
QuizQuestion,
|
||||
QuizAnswer,
|
||||
GameSession,
|
||||
SessionResponse,
|
||||
DIFFICULTY_MAPPING,
|
||||
SAMPLE_QUESTIONS,
|
||||
)
|
||||
|
||||
# Re-export helpers/state for any direct importers
|
||||
from .routes import ( # noqa: F401
|
||||
get_optional_current_user,
|
||||
get_user_id_from_auth,
|
||||
get_game_database,
|
||||
_sessions,
|
||||
_user_levels,
|
||||
USE_DATABASE,
|
||||
REQUIRE_AUTH,
|
||||
)
|
||||
|
||||
# Assemble the combined router.
|
||||
# Both sub-routers use prefix="/api/game", so include without extra prefix.
|
||||
router = APIRouter()
|
||||
router.include_router(_core_router)
|
||||
router.include_router(_session_router)
|
||||
router.include_router(_extended_router)
|
||||
Reference in New Issue
Block a user