21 lines
523 B
Python
21 lines
523 B
Python
# -*- coding: utf-8 -*-
|
|
"""营业日配置 API
|
|
|
|
提供公开端点返回当前营业日分割点配置,供前端动态获取。
|
|
"""
|
|
|
|
from fastapi import APIRouter
|
|
|
|
from app import config
|
|
|
|
router = APIRouter(prefix="/api/config", tags=["业务配置"])
|
|
|
|
|
|
@router.get("/business-day")
|
|
async def get_business_day_config():
|
|
"""返回当前营业日分割点配置。
|
|
|
|
无需认证(公开配置),前端启动时调用一次缓存。
|
|
"""
|
|
return {"business_day_start_hour": config.BUSINESS_DAY_START_HOUR}
|