Skip to content

Commit

Permalink
DO NOT KEEP this commit - fighting with dev env that won't reload
Browse files Browse the repository at this point in the history
/settings
  • Loading branch information
Paul F Bugni committed Dec 9, 2024
1 parent ef1e992 commit 6d05174
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions patientsearch/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ def user_info():
@api_blueprint.route("/settings/<string:config_key>")
def config_settings(config_key):
"""Non-secret application settings"""
raise ValueError("it's me1!!!!!!!!!!!!")
return jsonify({"message": "ok"})

# workaround no JSON representation for datetime.timedelta
class CustomJSONProvider(DefaultJSONProvider):
Expand All @@ -161,7 +163,7 @@ def default(self, obj):
jsonify_abort(
status_code=400, messag=f"Configuration key {key} not available"
)
return jsonify({key: current_app.config.get(key)})
return {key: current_app.config.get(key)}

config_settings = {}
for key in current_app.config:
Expand All @@ -170,7 +172,7 @@ def default(self, obj):
continue
config_settings[key] = current_app.config.get(key)

return jsonify(config_settings)
return config_settings


@api_blueprint.route("/validate_token", methods=["GET"])
Expand Down

0 comments on commit 6d05174

Please sign in to comment.