Update src/web/routes/upload/newapi_services.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
演变
2026-03-27 15:06:19 +08:00
committed by GitHub
parent 062afb35db
commit 75ce9c82e1

View File

@@ -70,7 +70,7 @@ def _to_response(svc) -> NewapiServiceResponse:
def _validated_newapi_api_key(api_key: str) -> str:
try:
return normalize_authorization_token(api_key)
return normalize_authorization_token(api_key, header_name="Root Token / API Key")
except ValueError as exc:
raise HTTPException(status_code=400, detail=str(exc)) from exc