fix(login): 中文提示登录批次账号上限

This commit is contained in:
yml
2026-11-22 09:38:54 +08:00
parent 2d1311820c
commit 492288e84f
4 changed files with 42 additions and 2 deletions
+6 -1
View File
@@ -363,8 +363,13 @@ class AccountOut(BaseModel):
# ---- 登录任务 ----
LOGIN_BATCH_MAX_ACCOUNTS = 50
class LoginBatchRequest(BaseModel):
account_ids: list[int] = Field(..., min_length=1, max_length=50)
# 上限由路由返回中文业务提示;这里保留更大的硬上限,避免直接暴露
# Pydantic 英文 "List should have at most ... items" 给前端。
account_ids: list[int] = Field(..., min_length=1, max_length=500)
max_login_retries: int = Field(0, ge=0)
max_total_time: float = Field(300, ge=0)
concurrency: int = Field(3, ge=1, le=10)