From 03a0016f1763ced14b8d55f855357e2b126f8077 Mon Sep 17 00:00:00 2001 From: Anthony Volk Date: Mon, 23 Dec 2024 16:23:16 +0100 Subject: [PATCH] fix: Remove improperly netsted metadata JSON --- changelog_entry.yaml | 4 ++++ policyengine_api/routes/metadata_routes.py | 14 +------------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index e69de29b..fc416dc7 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -0,0 +1,4 @@ +- bump: patch + changes: + fixed: + - Refactored metadata endpoint to remove improperly nested result JSON \ No newline at end of file diff --git a/policyengine_api/routes/metadata_routes.py b/policyengine_api/routes/metadata_routes.py index 89bdfbea..3c37e2cd 100644 --- a/policyengine_api/routes/metadata_routes.py +++ b/policyengine_api/routes/metadata_routes.py @@ -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)