Fixing vendor dashboard area
This commit is contained in:
16
app/api/v1/vendor/__init__.py
vendored
16
app/api/v1/vendor/__init__.py
vendored
@@ -40,18 +40,19 @@ router = APIRouter()
|
||||
# ============================================================================
|
||||
# These routes return JSON and are mounted at /api/v1/vendor/*
|
||||
|
||||
# Vendor info endpoint - must be first to handle GET /{vendor_code}
|
||||
router.include_router(info.router, tags=["vendor-info"])
|
||||
# IMPORTANT: Specific routes MUST be registered BEFORE catch-all routes
|
||||
# The info.router has GET /{vendor_code} which catches everything,
|
||||
# so it must be registered LAST
|
||||
|
||||
# Authentication
|
||||
# Authentication (no prefix, specific routes like /auth/login)
|
||||
router.include_router(auth.router, tags=["vendor-auth"])
|
||||
|
||||
# Vendor management
|
||||
# Vendor management (with prefixes: /dashboard/*, /profile/*, /settings/*)
|
||||
router.include_router(dashboard.router, tags=["vendor-dashboard"])
|
||||
router.include_router(profile.router, tags=["vendor-profile"])
|
||||
router.include_router(settings.router, tags=["vendor-settings"])
|
||||
|
||||
# Business operations
|
||||
# Business operations (with prefixes: /products/*, /orders/*, etc.)
|
||||
router.include_router(products.router, tags=["vendor-products"])
|
||||
router.include_router(orders.router, tags=["vendor-orders"])
|
||||
router.include_router(customers.router, tags=["vendor-customers"])
|
||||
@@ -59,10 +60,13 @@ router.include_router(team.router, tags=["vendor-team"])
|
||||
router.include_router(inventory.router, tags=["vendor-inventory"])
|
||||
router.include_router(marketplace.router, tags=["vendor-marketplace"])
|
||||
|
||||
# Services
|
||||
# Services (with prefixes: /payments/*, /media/*, etc.)
|
||||
router.include_router(payments.router, tags=["vendor-payments"])
|
||||
router.include_router(media.router, tags=["vendor-media"])
|
||||
router.include_router(notifications.router, tags=["vendor-notifications"])
|
||||
router.include_router(analytics.router, tags=["vendor-analytics"])
|
||||
|
||||
# Vendor info endpoint - MUST BE LAST! Has catch-all GET /{vendor_code}
|
||||
router.include_router(info.router, tags=["vendor-info"])
|
||||
|
||||
__all__ = ["router"]
|
||||
|
||||
Reference in New Issue
Block a user