Explorar el Código

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

雷二猛 hace 7 años
padre
commit
c207dae863
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  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