diff --git a/application/api/user/routes.py b/application/api/user/routes.py index 7d44ce9b..b3062005 100644 --- a/application/api/user/routes.py +++ b/application/api/user/routes.py @@ -485,8 +485,6 @@ class CombinedJson(Resource): @api.doc(description="Provide JSON file with combined available indexes") def get(self): user = "local" - sort_field = request.args.get("sort", "date") # Default to 'date' - sort_order = request.args.get("order", "desc") # Default to 'desc' data = [ { "name": "default", @@ -500,7 +498,7 @@ class CombinedJson(Resource): try: for index in sources_collection.find({"user": user}).sort( - sort_field, 1 if sort_order == "asc" else -1 + "date", -1 ): data.append( {