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:
5
app/api/v1/vendor/__init__.py
vendored
5
app/api/v1/vendor/__init__.py
vendored
@@ -19,6 +19,7 @@ Self-contained modules (auto-discovered from app/modules/{module}/routes/api/ven
|
||||
- inventory: Stock management, inventory tracking
|
||||
- orders: Order management, fulfillment, exceptions
|
||||
- marketplace: Letzshop integration, product sync
|
||||
- catalog: Vendor product catalog management
|
||||
- cms: Content pages management
|
||||
- customers: Customer management
|
||||
"""
|
||||
@@ -41,7 +42,6 @@ from . import (
|
||||
notifications,
|
||||
onboarding,
|
||||
payments,
|
||||
products,
|
||||
profile,
|
||||
settings,
|
||||
team,
|
||||
@@ -71,8 +71,7 @@ router.include_router(email_templates.router, tags=["vendor-email-templates"])
|
||||
router.include_router(email_settings.router, tags=["vendor-email-settings"])
|
||||
router.include_router(onboarding.router, tags=["vendor-onboarding"])
|
||||
|
||||
# Business operations (with prefixes: /products/*, etc.)
|
||||
router.include_router(products.router, tags=["vendor-products"])
|
||||
# Business operations (with prefixes: /invoices/*, /team/*)
|
||||
router.include_router(invoices.router, tags=["vendor-invoices"])
|
||||
router.include_router(team.router, tags=["vendor-team"])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user