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:
2026-01-30 23:24:10 +01:00
parent 7245f79f7b
commit e0b69f5a7d
10 changed files with 533 additions and 444 deletions

View File

@@ -35,7 +35,7 @@ from . import (
auth,
billing,
# content_pages - moved to app.modules.cms.routes.api.vendor
customers,
# customers - moved to app.modules.customers.routes.vendor
dashboard,
email_settings,
email_templates,
@@ -71,6 +71,9 @@ from app.modules.marketplace.routes.api.vendor import vendor_letzshop_router as
# CMS module router
from app.modules.cms.routes.api.vendor import router as cms_vendor_router
# Customers module router
from app.modules.customers.routes.vendor import vendor_router as customers_vendor_router
# Create vendor router
router = APIRouter()
@@ -104,7 +107,11 @@ router.include_router(orders_exceptions_router, tags=["vendor-order-exceptions"]
# Legacy: router.include_router(order_item_exceptions.router, tags=["vendor-order-exceptions"])
router.include_router(invoices.router, tags=["vendor-invoices"])
router.include_router(customers.router, tags=["vendor-customers"])
# Include customers module router (with module access control)
router.include_router(customers_vendor_router, tags=["vendor-customers"])
# Legacy: router.include_router(customers.router, tags=["vendor-customers"])
router.include_router(team.router, tags=["vendor-team"])
# Include inventory module router (with module access control)