David 10 lat temu
rodzic
commit
98291a6567
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      web.py

+ 1 - 1
web.py

@@ -78,7 +78,7 @@ def get_article(art_id):
 @app.route(BASEPATH+'/sources/', methods=['GET'])
 @app.route(BASEPATH+'/sources', methods=['GET'])
 def get_sources():
-    return jsonify({'sources': d.sources()})
+    return jsonify({'sources': sorted(d.sources(), key=lambda k: k['name'].lower())})
 
 @app.route(BASEPATH+'/sources/<string:source_id>', methods=['GET'])
 def get_source(source_id):