Skip to content

Commit

Permalink
update flask file
Browse files Browse the repository at this point in the history
  • Loading branch information
futuresea-dev committed Sep 28, 2024
1 parent 0a3f3c6 commit 0764026
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions defiback/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ def fetch_geojson_data():
# 'accept': 'application/vnd.github.v3.raw'
# })
response = requests.get(file_content.download_url)
response.raise_for_status()
decoded_content = response.json()
global_geojson_data = decoded_content
return decoded_content
except Exception as e:
print(f"Error fetching geojson data: {e}")
Expand Down Expand Up @@ -155,12 +153,6 @@ def find_hours(json_obj, name):
"""Counts the number of DeFi entries with specified opening hours."""
return sum(1 for entry in json_obj if entry.get("properties", {}).get("opening_hours") == name)

@app.errorhandler(Exception)
def handle_exception(e):
# log the error
print(f"Error: {e}")
return jsonify(error=str(e)), 500

def getApp():
"""Returns the Flask app instance."""
return app

0 comments on commit 0764026

Please sign in to comment.