Skip to content

Commit

Permalink
Merge pull request #2 from Geode-solutions/feat_back_tao
Browse files Browse the repository at this point in the history
ogwback
  • Loading branch information
JulienChampagnol authored Jun 3, 2024
2 parents 9318573 + dd5af09 commit 7fc34ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
10 changes: 6 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile
# pip-compile requirements.in
#
asgiref==3.8.1
# via
Expand Down Expand Up @@ -118,7 +118,7 @@ opengeode-io==6.5.1
# geode-viewables
# opengeode-geosciencesio
# opengeodeweb-back
opengeodeweb-back==4.1.1
opengeodeweb-back==4.2.0
# via -r requirements.in
python-dotenv==1.0.1
# via -r requirements.in
Expand All @@ -132,8 +132,10 @@ rpds-py==0.18.0
# jsonschema
# opengeodeweb-back
# referencing
typing-extensions==4.11.0
# via asgiref
typing-extensions==4.12.0
# via
# asgiref
# opengeodeweb-back
werkzeug==3.0.2
# via
# flask
Expand Down
14 changes: 3 additions & 11 deletions src/geodeapp_back/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from werkzeug.exceptions import HTTPException

from .config import *
from opengeodeweb_back.geode_functions import handle_exception


if os.path.isfile("./.env"):
Expand Down Expand Up @@ -86,17 +87,8 @@ def kill_task():


@app.errorhandler(HTTPException)
def handle_exception(e):
response = e.get_response()
response.data = flask.json.dumps(
{
"code": e.code,
"name": e.name,
"description": e.description,
}
)
response.content_type = "application/json"
return response
def errorhandler(e):
return handle_exception(e)


@app.route("/geodeapp/createbackend", methods=["POST"])
Expand Down

0 comments on commit 7fc34ed

Please sign in to comment.