fix: 平台登录默认显示验证码,管理员跳过验证码
This commit is contained in:
@@ -117,6 +117,8 @@ async def login(body: dict) -> dict:
|
||||
mode = _setting(session).login_mode
|
||||
if mode != "nqi":
|
||||
raise _bad("账号或密码不正确")
|
||||
if str(body.get("sessionId") or ""):
|
||||
return await nqi_finish(body)
|
||||
started = await nqi_start({"username": username, "purpose": "login"})
|
||||
if started.get("status") == "captcha":
|
||||
return {**started, "status": "need_captcha"}
|
||||
|
||||
Reference in New Issue
Block a user