Python (6 files in klausur-service): - rbac.py (1,132 → 4), admin_api.py (1,012 → 4) - routes/eh.py (1,111 → 4), ocr_pipeline_geometry.py (1,105 → 5) Python (2 files in backend-lehrer): - unit_api.py (1,226 → 6), game_api.py (1,129 → 5) Website (6 page files): - 4x klausur-korrektur pages (1,249-1,328 LOC each) → shared components in website/components/klausur-korrektur/ (17 shared files) - companion (1,057 → 10), magic-help (1,017 → 8) All re-export barrels preserve backward compatibility. Zero import errors verified. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
47 lines
1.5 KiB
Python
47 lines
1.5 KiB
Python
# ==============================================
|
|
# 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)
|