starting to build console controller and views

This commit is contained in:
2020-05-11 01:47:14 -05:00
parent 7932db90d5
commit 18e6a1b141
18 changed files with 345 additions and 89 deletions

View File

@ -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.")