refactor: migrate messaging and media routes to modules
Messaging module (communication): - vendor_messages.py: Conversation and message management - vendor_notifications.py: Vendor notifications - vendor_email_settings.py: SMTP and provider configuration - vendor_email_templates.py: Email template customization CMS module (content management): - vendor_media.py: Media library management - vendor_content_pages.py: Content page overrides All routes auto-discovered via is_self_contained=True. Deleted 5 legacy files from app/api/v1/vendor/. app/api/v1/vendor/ now empty except for __init__.py (auto-discovery only). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
29
app/api/v1/vendor/__init__.py
vendored
29
app/api/v1/vendor/__init__.py
vendored
@@ -21,44 +21,23 @@ Self-contained modules (auto-discovered from app/modules/{module}/routes/api/ven
|
||||
- orders: Order management, fulfillment, exceptions, invoices
|
||||
- marketplace: Letzshop integration, product sync, onboarding
|
||||
- catalog: Vendor product catalog management
|
||||
- cms: Content pages management
|
||||
- cms: Content pages management, media library
|
||||
- customers: Customer management
|
||||
- payments: Payment configuration, Stripe connect, transactions
|
||||
- tenancy: Vendor info, auth, profile, team management
|
||||
- messaging: Messages, notifications, email settings, email templates
|
||||
- core: Dashboard, settings
|
||||
"""
|
||||
|
||||
from fastapi import APIRouter
|
||||
|
||||
# Import all sub-routers (legacy routes that haven't been migrated to modules)
|
||||
from . import (
|
||||
email_settings,
|
||||
email_templates,
|
||||
media,
|
||||
messages,
|
||||
notifications,
|
||||
)
|
||||
|
||||
# Create vendor router
|
||||
router = APIRouter()
|
||||
|
||||
# ============================================================================
|
||||
# JSON API ROUTES ONLY
|
||||
# ============================================================================
|
||||
# These routes return JSON and are mounted at /api/v1/vendor/*
|
||||
|
||||
# Email configuration
|
||||
router.include_router(email_templates.router, tags=["vendor-email-templates"])
|
||||
router.include_router(email_settings.router, tags=["vendor-email-settings"])
|
||||
|
||||
# Services (with prefixes: /media/*, etc.)
|
||||
router.include_router(media.router, tags=["vendor-media"])
|
||||
router.include_router(notifications.router, tags=["vendor-notifications"])
|
||||
router.include_router(messages.router, tags=["vendor-messages"])
|
||||
|
||||
# Services (with prefixes: /media/*, etc.)
|
||||
router.include_router(media.router, tags=["vendor-media"])
|
||||
router.include_router(notifications.router, tags=["vendor-notifications"])
|
||||
router.include_router(messages.router, tags=["vendor-messages"])
|
||||
# All vendor routes are now auto-discovered from self-contained modules.
|
||||
|
||||
|
||||
# ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user