From f7c6081ca078131cf82a7edc0ebb4d17eddac7bf Mon Sep 17 00:00:00 2001 From: viveksantayana Date: Wed, 31 Aug 2022 00:48:13 +0100 Subject: [PATCH] Simplified question route --- server/app/views.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/server/app/views.py b/server/app/views.py index 2bf37bb..9585ada 100644 --- a/server/app/views.py +++ b/server/app/views.py @@ -9,11 +9,9 @@ views = Blueprint( import_name=__name__ ) -@views.route('/fetch//') -def _fetch(data_type): - if not check_file(f'{data_type}.json'): return abort(404) - if data_type == 'questions': return render_questions() - return load(f'{data_type}.json') +@views.route('/questions/') +def _questions(): + return render_questions() @views.route('/submit/', methods=['POST']) def _submit():