From 028193f525793d5bfcabad96e30bdf95f43367d5 Mon Sep 17 00:00:00 2001 From: David Pomerenke <46022183+davidpomerenke@users.noreply.github.com> Date: Mon, 25 Mar 2024 19:01:31 +0000 Subject: [PATCH] fix(api.py): Fix /info endpoint --- backend-python/media_impact_monitor/api.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/backend-python/media_impact_monitor/api.py b/backend-python/media_impact_monitor/api.py index cbb360e0..9c8508a7 100644 --- a/backend-python/media_impact_monitor/api.py +++ b/backend-python/media_impact_monitor/api.py @@ -25,15 +25,19 @@ ) from media_impact_monitor.util.date import verify_dates -app = FastAPI( +metadata = dict( title="Media Impact Monitor API", version="0.1.2", contact=dict( name="Social Change Lab", url="https://github.com/socialchangelab/media-impact-monitor", + redoc_url="/docs", + docs_url=None, ), - docs_url=None, - redoc_url="/docs", +) + +app = FastAPI( + **metadata, ) @@ -45,7 +49,7 @@ def read_root(): @app.get("/info") def get_info() -> dict: """Get metadata (title, version, etc.).""" - return app.__dict__ + return metadata @app.post("/events")