starting to build console controller and views
This commit is contained in:
@ -71,11 +71,11 @@ def login():
|
||||
|
||||
@bp.route("/magic/<string:token>", methods=("GET", ))
|
||||
def magiclink(token):
|
||||
email = get_model().consumeToken(token)
|
||||
email = get_model().consume_token(token)
|
||||
if email is not None:
|
||||
session.clear()
|
||||
session["account"] = email
|
||||
return redirect(url_for("index"))
|
||||
return redirect(url_for("console.index"))
|
||||
else:
|
||||
abort(404, f"Token {token} doesn't exist or has already been used.")
|
||||
|
||||
|
Reference in New Issue
Block a user