Files
tianpu-ems/backend/app/api/v1/branding.py

21 lines
808 B
Python
Raw Normal View History

from fastapi import APIRouter
from app.core.config import get_settings
router = APIRouter(prefix="/branding", tags=["品牌配置"])
@router.get("")
async def get_branding():
"""Return customer-specific branding configuration"""
settings = get_settings()
customer_config = settings.load_customer_config()
return {
"customer": settings.CUSTOMER,
"customer_name": customer_config.get("customer_name", settings.CUSTOMER),
"platform_name": customer_config.get("platform_name", settings.APP_NAME),
"platform_name_en": customer_config.get("platform_name_en", "Smart EMS"),
"logo_url": customer_config.get("logo_url", ""),
"theme_color": customer_config.get("theme_color", "#1890ff"),
"features": customer_config.get("features", {}),
}