"""The one router constructor the admin modules share. The admin gate lives here rather than on each endpoint: a route added to any of these modules is admin-only by construction, and there is no way to forget the dependency. """ from fastapi import APIRouter, Depends from app.auth.deps import require_admin def admin_router() -> APIRouter: return APIRouter( prefix="/admin", tags=["admin"], dependencies=[Depends(require_admin)] )