Deprecated /register endpoint

This commit is contained in:
Emily 2019-05-12 18:32:07 +01:00
parent 81dbaceb46
commit ea7e9a45ac

View File

@ -96,24 +96,6 @@ def login():
"register": form_register "register": form_register
}) })
@glob.app.route("/register", methods = ["GET", "POST"])
def register():
if flask_login.current_user.is_authenticated:
flash(gettext("Already logged in"), "info")
return redirect(url_for("dashboard"))
form = RegisterForm(request.form)
if request.method == "POST" and form.validate():
try:
register_account(form.email.data, form.password.data, form.firstname.data, form.surname.data)
except Exception as e:
flash(gettext(str(e)), "danger")
return render_template("register.html", form=form)
flash(gettext("User registered"), "success")
return redirect(url_for("login"))
return render_template("register.html", form=form)
@glob.app.route("/logout") @glob.app.route("/logout")
@flask_login.login_required @flask_login.login_required
def logout(): def logout():