diff --git a/src/api/main.py b/src/api/main.py index 904fffd..28bf5e1 100644 --- a/src/api/main.py +++ b/src/api/main.py @@ -15,6 +15,7 @@ from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from fastapi.openapi.docs import get_swagger_ui_html +from fastapi.responses import RedirectResponse from mangum import Mangum from starlette.middleware.sessions import SessionMiddleware @@ -76,6 +77,11 @@ async def swagger_ui_html(): ) +@app.get("/", include_in_schema=False) +def redirect_to_docs(): + return RedirectResponse(url="/docs") + + # This is the entry point for AWS Lambda handler = Mangum(app)