소스 검색

F 通用 修复登录成功后登录限制计数器不清零的问题

雷二猛 7 년 전
부모
커밋
c207dae863
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      spug_api/apps/account/user.py

+ 1 - 0
spug_api/apps/account/user.py

@@ -124,6 +124,7 @@ def login():
         if user:
             if user.is_active:
                 if user.verify_password(form.password):
+                    login_limit.pop(form.username, None)
                     token = uuid.uuid4().hex
                     user.access_token = token
                     user.token_expired = time.time() + 8 * 60 * 60