Skip to content

Commit

Permalink
Merge pull request #25 from SoleSearch-Demos/main
Browse files Browse the repository at this point in the history
  • Loading branch information
peterrauscher authored Mar 30, 2024
2 parents 0ba3710 + 53f1310 commit e648c26
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

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

Expand Down

0 comments on commit e648c26

Please sign in to comment.