Simplified question route
This commit is contained in:
parent
a50926b192
commit
f7c6081ca0
@ -9,11 +9,9 @@ views = Blueprint(
|
|||||||
import_name=__name__
|
import_name=__name__
|
||||||
)
|
)
|
||||||
|
|
||||||
@views.route('/fetch/<string:data_type>/')
|
@views.route('/questions/')
|
||||||
def _fetch(data_type):
|
def _questions():
|
||||||
if not check_file(f'{data_type}.json'): return abort(404)
|
return render_questions()
|
||||||
if data_type == 'questions': return render_questions()
|
|
||||||
return load(f'{data_type}.json')
|
|
||||||
|
|
||||||
@views.route('/submit/', methods=['POST'])
|
@views.route('/submit/', methods=['POST'])
|
||||||
def _submit():
|
def _submit():
|
||||||
|
Loading…
Reference in New Issue
Block a user