# app/modules/inventory/routes/vendor.py """ Inventory module vendor routes. This module wraps the existing vendor inventory 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 from app.api.v1.vendor import inventory as inventory_routes # Create module-aware router vendor_router = APIRouter( prefix="/inventory", dependencies=[Depends(require_module_access("inventory"))], ) # Re-export all routes from the original module with module access control for route in inventory_routes.router.routes: vendor_router.routes.append(route)