# app/modules/analytics/routes/vendor.py """ Analytics module vendor routes. This module wraps the existing vendor analytics routes and adds module-based access control. Routes are re-exported from the original location with the module access dependency. """ from fastapi import APIRouter, Depends from app.api.deps import require_module_access # Import original router (direct import to avoid circular dependency) from app.api.v1.vendor.analytics import router as original_router # Create module-aware router vendor_router = APIRouter( prefix="/analytics", dependencies=[Depends(require_module_access("analytics"))], ) # Re-export all routes from the original module with module access control for route in original_router.routes: vendor_router.routes.append(route)