From 83eefd51d79dc2c0fa778303042c581b4691e82e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eila=20V=C3=A4yrynen?= Date: Sun, 3 Dec 2023 13:28:36 +0200 Subject: Rearrenge rest of db actions. --- routes/create.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'routes/create.py') diff --git a/routes/create.py b/routes/create.py index 7322079..d2701a2 100644 --- a/routes/create.py +++ b/routes/create.py @@ -33,7 +33,7 @@ def create(): nick=get_nick(), quiz_set=True, questions=rows2dicts( - D.get_questions(session["quiz_id"]), + D.quiz.questions(session["quiz_id"]), ['i','q','n','p','a'] ) ) @@ -57,7 +57,7 @@ def quiz_ready(): if "quiz_id" not in session.keys(): session["alert"] = "Kyselmä jota ei ole aloitettu ei voi olla valmis." return redirect("/#create") - if not D.is_user_answered(session["quiz_id"], session["id"]): + if not D.quiz.user(session["quiz_id"], session["id"]): session["alert"] = "Tyhjän kyselmän luominen ei käy päinsä!" return redirect("/#create") quiz_id = session["quiz_id"] -- cgit v1.2.3