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

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-04-25 22:32:45 +02:00
parent 165c493d1e
commit dde45b29db
93 changed files with 9469 additions and 9290 deletions

View File

@@ -1,46 +1,4 @@
# ==============================================
# 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 game_routes import router as _core_router
from game_session_routes import router as _session_router
from game_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 game_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)
# Backward-compat shim -- module moved to game/api.py
import importlib as _importlib
import sys as _sys
_sys.modules[__name__] = _importlib.import_module("game.api")