From 8c056dfea2d1350633143d103752b2bf39f2ce52 Mon Sep 17 00:00:00 2001 From: Niraj Adhikari Date: Thu, 13 Jun 2024 14:11:58 +0545 Subject: [PATCH] redirect home to docs page --- src/backend/app/main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/backend/app/main.py b/src/backend/app/main.py index f31b66fd..4653978b 100644 --- a/src/backend/app/main.py +++ b/src/backend/app/main.py @@ -5,6 +5,7 @@ from app.config import settings from app.projects import project_routes from app.waypoints import waypoint_routes +from fastapi.responses import RedirectResponse from app.users import user_routes from loguru import logger as log @@ -94,5 +95,6 @@ def get_application() -> FastAPI: @api.get("/") -def read_root(): - return {"Hello": "World"} +async def home(): + """Redirect home to docs.""" + return RedirectResponse("/docs")