修复了一些已知问题
This commit is contained in:
@@ -37,7 +37,7 @@ class AuthService:
|
||||
attempts = await RedisClient.get(f"login_attempts:{username}")
|
||||
if attempts and int(attempts) >= 5:
|
||||
await LogService.write_login_log(username, 0, ip, user_agent, "登录失败次数过多")
|
||||
return {"success": False, "message": "登录失败次数过多,请15分钟后重试"}
|
||||
return {"success": False, "message": "登录失败次数过多,请5分钟后重试"}
|
||||
|
||||
# 获取用户信息
|
||||
user = await UserModel.get_by_username(username)
|
||||
|
||||
Reference in New Issue
Block a user