redirect to /login if the person has logged into the site before

remotes/1693045480750635534/spooky-22
Aevann1 2022-08-25 00:43:44 +02:00
parent c5966d3c70
commit 2099e31b6a
1 changed files with 2 additions and 1 deletions

View File

@ -19,7 +19,8 @@ def error_401(e):
path = request.path
qs = urlencode(dict(request.values))
argval = quote(f"{path}?{qs}", safe='')
return redirect(f"/signup?redirect={argval}")
if session.get("history"): return redirect(f"/login?redirect={argval}")
else: return redirect(f"/signup?redirect={argval}")
@app.errorhandler(406)
def error_406(e):