Skip to content

Commit

Permalink
Merge pull request #2066 from PolicyEngine/fix/nested-metadata-response
Browse files Browse the repository at this point in the history
Remove improperly netsted metadata JSON
  • Loading branch information
anth-volk authored Dec 23, 2024
2 parents edc9578 + 03a0016 commit c148f00
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
4 changes: 4 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- bump: patch
changes:
fixed:
- Refactored metadata endpoint to remove improperly nested result JSON
14 changes: 1 addition & 13 deletions policyengine_api/routes/metadata_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,4 @@ def get_metadata(country_id: str) -> Response:
Args:
country_id (str): The country ID.
"""
metadata = metadata_service.get_metadata(country_id)

return Response(
json.dumps(
{
"status": "ok",
"message": None,
"result": metadata,
}
),
status=200,
mimetype="application/json",
)
return metadata_service.get_metadata(country_id)

0 comments on commit c148f00

Please sign in to comment.