refactor(customers): migrate routes to module with auto-discovery
- Move customer route implementations to app/modules/customers/routes/
- Convert legacy app/api/v1/{admin,vendor}/customers.py to re-exports
- Update router registrations to use module routers with access control
- Fix CustomerListResponse pagination (page/per_page/total_pages)
- Update URL routing docs to use storefront consistently
- Fix mkdocs.yml nav references (shop -> storefront)
- Fix broken doc links in logging.md and cdn-fallback-strategy.md
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -49,7 +49,7 @@ from . import (
|
||||
code_quality,
|
||||
companies,
|
||||
# content_pages - moved to app.modules.cms.routes.api.admin
|
||||
customers,
|
||||
# customers - moved to app.modules.customers.routes.admin
|
||||
dashboard,
|
||||
email_templates,
|
||||
features,
|
||||
@@ -92,6 +92,9 @@ from app.modules.marketplace.routes.api.admin import admin_letzshop_router as le
|
||||
# CMS module router
|
||||
from app.modules.cms.routes.api.admin import router as cms_admin_router
|
||||
|
||||
# Customers module router
|
||||
from app.modules.customers.routes.admin import admin_router as customers_admin_router
|
||||
|
||||
# Create admin router
|
||||
router = APIRouter()
|
||||
|
||||
@@ -149,8 +152,9 @@ router.include_router(users.router, tags=["admin-users"])
|
||||
# Include admin user management endpoints (super admin only)
|
||||
router.include_router(admin_users.router, tags=["admin-admin-users"])
|
||||
|
||||
# Include customer management endpoints
|
||||
router.include_router(customers.router, tags=["admin-customers"])
|
||||
# Include customers module router (with module access control)
|
||||
router.include_router(customers_admin_router, tags=["admin-customers"])
|
||||
# Legacy: router.include_router(customers.router, tags=["admin-customers"])
|
||||
|
||||
|
||||
# ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user