|
@@ -15,7 +15,7 @@ router = APIRouter()
|
|
|
http_client = httpx.AsyncClient(timeout=10.0, limits=httpx.Limits(max_keepalive_connections=20, max_connections=100))
|
|
http_client = httpx.AsyncClient(timeout=10.0, limits=httpx.Limits(max_keepalive_connections=20, max_connections=100))
|
|
|
|
|
|
|
|
|
|
|
|
|
-@router.get("/scoring_config", summary="[代理] 获取评分配置 [用户调用]")
|
|
|
|
|
|
|
+@router.get("/scoring_config", summary="(管理员) 获取评分配置 [用户调用]")
|
|
|
async def proxy_get_scoring_config(current_user: dict = Depends(require_admin_user)):
|
|
async def proxy_get_scoring_config(current_user: dict = Depends(require_admin_user)):
|
|
|
target_url = settings.SCORE_SERVER_CONFIG_URL
|
|
target_url = settings.SCORE_SERVER_CONFIG_URL
|
|
|
|
|
|
|
@@ -36,7 +36,7 @@ async def proxy_get_scoring_config(current_user: dict = Depends(require_admin_us
|
|
|
raise HTTPException(status_code=503, detail=str(exc))
|
|
raise HTTPException(status_code=503, detail=str(exc))
|
|
|
|
|
|
|
|
|
|
|
|
|
-@router.put("/scoring_config", summary="[代理] 更新评分配置 [用户调用]")
|
|
|
|
|
|
|
+@router.put("/scoring_config", summary="(管理员) 更新评分配置 [用户调用]")
|
|
|
async def proxy_update_scoring_config(
|
|
async def proxy_update_scoring_config(
|
|
|
config_data: dict = Body(...),
|
|
config_data: dict = Body(...),
|
|
|
current_user: dict = Depends(require_admin_user)
|
|
current_user: dict = Depends(require_admin_user)
|