login: don't allow logged in users to attempt to login

pull/32/head
justcool393 2022-11-30 10:49:15 -06:00
parent fe9252d42f
commit b59e4cadaa
1 changed files with 3 additions and 2 deletions

View File

@ -37,9 +37,10 @@ def login_deduct_when(resp):
return g.login_failed
@app.post("/login")
@auth_desired
@limiter.limit("6/minute;10/day", deduct_when=login_deduct_when)
def login_post():
template = ''
def login_post(v:Optional[User]):
if v: abort(400)
g.login_failed = True
username = request.values.get("username")