diff --git a/server/app/views.py b/server/app/views.py index 2bf37bb..aa7de9b 100644 --- a/server/app/views.py +++ b/server/app/views.py @@ -1,3 +1,4 @@ +from .models import Entry from .tools.data import check_file, load from .tools.quiz import compile_results, evaluate_answers, render_questions @@ -20,6 +21,8 @@ def _submit(): answers = request.json scores = evaluate_answers(answers) results = compile_results(results=scores) + new_entry = Entry(answers=answers, results=results) + new_entry.add() return jsonify(results) @views.route('/results/')