Updated css_list function to return a list instead of a json

This commit is contained in:
Pieter-Jan Cassiman 2019-12-17 22:26:48 +01:00
parent 7ac0d6291e
commit 285c36f0cf

View file

@ -73,13 +73,13 @@ def get_css_dict(css_path):
return themes_dict
@general_bp.route("/css-list")
# @general_bp.route("/css-list")
def css_list():
if request.cookies.get('performance', '') == 'highPerformance':
css_path = 'static/css/themes/highPerformance/'
else:
css_path = 'static/css/themes/lowPerformance/'
return jsonify(list(get_css_dict(css_path).keys()))
return list(get_css_dict(css_path).keys())
@general_bp.route("/css")