108 lines
3.2 KiB
Python
108 lines
3.2 KiB
Python
# app/api/v1/admin/__init__.py
|
|
"""
|
|
Admin API router aggregation.
|
|
|
|
This module combines all admin-related JSON API endpoints:
|
|
- Authentication (login/logout)
|
|
- Vendor management (CRUD, bulk operations)
|
|
- Vendor domains management (custom domains, DNS verification)
|
|
- Vendor themes management (theme editor, presets)
|
|
- User management (status, roles)
|
|
- Dashboard and statistics
|
|
- Marketplace monitoring
|
|
- Audit logging
|
|
- Platform settings
|
|
- Notifications and alerts
|
|
|
|
IMPORTANT:
|
|
- This router is for JSON API endpoints only
|
|
- HTML page routes are mounted separately in main.py at /vendor/*
|
|
- Do NOT include pages.router here - it causes route conflicts
|
|
"""
|
|
|
|
from fastapi import APIRouter
|
|
|
|
# Import all admin routers
|
|
from . import (
|
|
auth,
|
|
vendors,
|
|
vendor_domains,
|
|
vendor_themes,
|
|
users,
|
|
dashboard,
|
|
marketplace,
|
|
monitoring,
|
|
audit,
|
|
settings,
|
|
notifications
|
|
)
|
|
|
|
# Create admin router
|
|
router = APIRouter()
|
|
|
|
|
|
# ============================================================================
|
|
# Authentication & Authorization
|
|
# ============================================================================
|
|
|
|
# Include authentication endpoints
|
|
router.include_router(auth.router, tags=["admin-auth"])
|
|
|
|
|
|
# ============================================================================
|
|
# Vendor Management
|
|
# ============================================================================
|
|
|
|
# Include vendor management endpoints
|
|
router.include_router(vendors.router, tags=["admin-vendors"])
|
|
|
|
# Include vendor domains management endpoints
|
|
router.include_router(vendor_domains.router, tags=["admin-vendor-domains"])
|
|
|
|
# Include vendor themes management endpoints
|
|
router.include_router(vendor_themes.router, tags=["admin-vendor-themes"])
|
|
|
|
|
|
# ============================================================================
|
|
# User Management
|
|
# ============================================================================
|
|
|
|
# Include user management endpoints
|
|
router.include_router(users.router, tags=["admin-users"])
|
|
|
|
|
|
# ============================================================================
|
|
# Dashboard & Statistics
|
|
# ============================================================================
|
|
|
|
# Include dashboard and statistics endpoints
|
|
router.include_router(dashboard.router, tags=["admin-dashboard"])
|
|
|
|
|
|
# ============================================================================
|
|
# Marketplace & Imports
|
|
# ============================================================================
|
|
|
|
# Include marketplace monitoring endpoints
|
|
router.include_router(marketplace.router, tags=["admin-marketplace"])
|
|
|
|
|
|
# ============================================================================
|
|
# Platform Administration
|
|
# ============================================================================
|
|
|
|
# Include monitoring endpoints (placeholder for future implementation)
|
|
# router.include_router(monitoring.router, tags=["admin-monitoring"])
|
|
|
|
# Include audit logging endpoints
|
|
router.include_router(audit.router, tags=["admin-audit"])
|
|
|
|
# Include platform settings endpoints
|
|
router.include_router(settings.router, tags=["admin-settings"])
|
|
|
|
# Include notifications and alerts endpoints
|
|
router.include_router(notifications.router, tags=["admin-notifications"])
|
|
|
|
# Export the router
|
|
__all__ = ["router"]
|