diff options
author | Minea Salmimaa <msalmima@local> | 2023-12-03 12:44:45 +0200 |
---|---|---|
committer | Minea Salmimaa <msalmima@local> | 2023-12-03 12:44:45 +0200 |
commit | e0ca9caf5a49981ad999b1c0c3fec69d7c4871e4 (patch) | |
tree | 6402666bec2999dda0e1e7460b91b21e17310479 /routes/create.py | |
parent | 7353c51df2d074cbe01913044bda7aeef62a31b7 (diff) |
Moving quiz related db actions to separete class and file.
Diffstat (limited to 'routes/create.py')
-rw-r--r-- | routes/create.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/routes/create.py b/routes/create.py index af2e25e..7322079 100644 --- a/routes/create.py +++ b/routes/create.py @@ -18,7 +18,7 @@ def create(): alert=get_alert(), nick=get_nick() ) - if D.get_quiz_link(session["quiz_id"]): + if D.quiz.get_link(session["quiz_id"]): return render_template( "create.html", caller="create", @@ -46,7 +46,7 @@ def new_quiz(): session["alert"]="Tarvitset nimimerkin loudaksesi." return redirect("/#create") user_id = session["id"] - session["quiz_id"] = D.quiz_new( user_id ) + session["quiz_id"] = D.quiz.new( user_id ) return redirect("/#create") @@ -62,5 +62,5 @@ def quiz_ready(): return redirect("/#create") quiz_id = session["quiz_id"] session["answer_id"] = session["quiz_id"] - D.set_quiz_link(session["quiz_id"], generate_link()) + D.quiz.set_link(session["quiz_id"], generate_link()) return redirect("/#analyse") |