Skip to content

Commit

Permalink
fix(api.py): Fix /info endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
davidpomerenke committed Mar 25, 2024
1 parent 4f255f0 commit 028193f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions backend-python/media_impact_monitor/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)


Expand All @@ -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")
Expand Down

0 comments on commit 028193f

Please sign in to comment.