bug fixes part 2

This commit is contained in:
Jack Eilles 2024-01-12 09:35:00 +00:00
parent 4f8ea6f164
commit ec967bf3bc

View file

@ -162,6 +162,7 @@ def getInfo(id):
return worker.idInfo(id) return worker.idInfo(id)
@csrf.exempt
@app.route('/<id>/delete', methods=["POST"]) @app.route('/<id>/delete', methods=["POST"])
@login_required @login_required
def delete(id): def delete(id):
@ -210,7 +211,7 @@ def register():
return redirect("/") return redirect("/")
else: else:
if request.method == "GET": if request.method == "GET":
return render_template("register.html", form=RegistrationForm()) return render_template("register.html", form=RegistrationForm(), title="Register")
elif request.method == "POST": elif request.method == "POST":
username = request.form.get("username") username = request.form.get("username")
password = request.form.get("password") password = request.form.get("password")
@ -230,7 +231,7 @@ def login():
return redirect("/") return redirect("/")
else: else:
if request.method == "GET": if request.method == "GET":
return render_template("login.html", form=LoginForm()) return render_template("login.html", form=LoginForm(), title="Login")
elif request.method == "POST": elif request.method == "POST":
username = request.form.get("username") username = request.form.get("username")
password = request.form.get("password") password = request.form.get("password")