summaryrefslogtreecommitdiff
path: root/routes/create.py
diff options
context:
space:
mode:
Diffstat (limited to 'routes/create.py')
-rw-r--r--routes/create.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/routes/create.py b/routes/create.py
index 083cc0e..2de8e27 100644
--- a/routes/create.py
+++ b/routes/create.py
@@ -41,7 +41,8 @@ def create():
@app.route("/set/quiz",methods=["POST"])
def new_quiz():
- csrf_check("/#create")
+ if csrf_check():
+ return redirect("/#create")
if not "id" in session.keys():
session["alert"]="Tarvitset nimimerkin loudaksesi."
return redirect("/#create")
@@ -52,7 +53,8 @@ def new_quiz():
@app.route("/set/quiz_ready",methods=["POST"])
def quiz_ready():
- csrf_check("/#create")
+ if csrf_check():
+ return redirect("/#create")
if "quiz_id" not in session.keys():
session["alert"] = "Kyselmä jota ei ole aloitettu ei voi olla valmis."
return redirect("/#create")