From b868d0ba58384fce5a9a45ae153dee9815327d55 Mon Sep 17 00:00:00 2001 From: Senni Heidari Date: Tue, 21 Nov 2023 11:36:12 +0200 Subject: Update directory hierarchy --- routes/set/quiz.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 routes/set/quiz.py (limited to 'routes/set/quiz.py') diff --git a/routes/set/quiz.py b/routes/set/quiz.py new file mode 100644 index 0000000..9ad13da --- /dev/null +++ b/routes/set/quiz.py @@ -0,0 +1,13 @@ +from app import app +from flask import render_template, session, request, redirect +import db_actions as D + + +@app.route("/set/quiz",methods=["POST"]) +def new_quiz(): + if not "id" in session.keys(): + session["alert"]="Tarvitset nimimerkin loudaksesi" + return redirect("/#nick") + user_id = session["id"] + session["quiz_id"] = D.quiz_new( user_id ) + return redirect("/#create") -- cgit v1.2.3