Skip to content

Commit

Permalink
add newline after response
Browse files Browse the repository at this point in the history
  • Loading branch information
clemensgg committed Sep 2, 2023
1 parent 4123cd4 commit c2f861a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ def fetch_network_data():

sorted_results = sorted(results, key=lambda x: x['upgrade_found'], reverse=True)
reordered_results = [reorder_data(result) for result in sorted_results]
return Response(json.dumps(reordered_results, indent=2), content_type="application/json")
return Response(json.dumps(reordered_results, indent=2) + '\n', content_type="application/json")

except Exception as e:
return jsonify({"error": str(e)}), 500
Expand All @@ -485,7 +485,7 @@ def get_mainnet_data():
results = [r for r in results if r is not None]
sorted_results = sorted(results, key=lambda x: x['upgrade_found'], reverse=True)
reordered_results = [reorder_data(result) for result in sorted_results]
return Response(json.dumps(reordered_results), content_type="application/json")
return Response(json.dumps(reordered_results) + '\n', content_type="application/json")

@app.route('/testnets')
# @cache.cached(timeout=600) # Cache the result for 10 minutes
Expand All @@ -497,7 +497,7 @@ def get_testnet_data():
results = [r for r in results if r is not None]
sorted_results = sorted(results, key=lambda x: x['upgrade_found'], reverse=True)
reordered_results = [reorder_data(result) for result in sorted_results]
return Response(json.dumps(reordered_results), content_type="application/json")
return Response(json.dumps(reordered_results) + '\n', content_type="application/json")

if __name__ == '__main__':
app.debug = True
Expand Down

0 comments on commit c2f861a

Please sign in to comment.