refactor: migrate products and vendor_products to module auto-discovery
- Move admin/products.py to marketplace module as admin_products.py (marketplace product catalog browsing) - Move admin/vendor_products.py to catalog module as admin.py (vendor catalog management) - Move vendor/products.py to catalog module as vendor.py (vendor's own product catalog) - Update marketplace admin router to include products routes - Update catalog module routes/api/__init__.py with lazy imports - Remove legacy imports from admin and vendor API init files All product routes now auto-discovered via module system. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -29,7 +29,8 @@ Self-contained modules (auto-discovered from app/modules/{module}/routes/api/adm
|
||||
- billing: Subscription tiers, vendor billing, invoices
|
||||
- inventory: Stock management, inventory tracking
|
||||
- orders: Order management, fulfillment, exceptions
|
||||
- marketplace: Letzshop integration, product sync
|
||||
- marketplace: Letzshop integration, product sync, marketplace products
|
||||
- catalog: Vendor product catalog management
|
||||
- cms: Content pages management
|
||||
- customers: Customer management
|
||||
"""
|
||||
@@ -58,13 +59,11 @@ from . import (
|
||||
notifications,
|
||||
platform_health,
|
||||
platforms,
|
||||
products,
|
||||
settings,
|
||||
subscriptions, # Legacy - will be replaced by billing module router
|
||||
tests,
|
||||
users,
|
||||
vendor_domains,
|
||||
vendor_products,
|
||||
vendor_themes,
|
||||
vendors,
|
||||
)
|
||||
@@ -129,17 +128,6 @@ router.include_router(admin_users.router, tags=["admin-admin-users"])
|
||||
router.include_router(dashboard.router, tags=["admin-dashboard"])
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# Vendor Operations (Product Catalog)
|
||||
# ============================================================================
|
||||
|
||||
# Include marketplace product catalog management endpoints
|
||||
router.include_router(products.router, tags=["admin-marketplace-products"])
|
||||
|
||||
# Include vendor product catalog management endpoints
|
||||
router.include_router(vendor_products.router, tags=["admin-vendor-products"])
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# Platform Administration
|
||||
# ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user