diff --git a/api/main.py b/api/main.py index 633e208..0f2a2b5 100644 --- a/api/main.py +++ b/api/main.py @@ -89,7 +89,7 @@ else: logger.warning("未检测到 LLM API Key 配置") logger.info("===================") -app = FastAPI(title="Life Echo API", version="1.0.0") +app = FastAPI(title="Life Echo API", version="1.0.0", docs_url=None, redoc_url=None, openapi_url=None) @app.on_event("startup") @@ -177,11 +177,6 @@ app.include_router(home.router) # 应用官网主页 app.mount("/static", StaticFiles(directory=Path(__file__).parent / "static"), name="static") -@app.get("/") -async def root(): - return {"message": "Life Echo API", "version": "1.0.0"} - - @app.get("/health") async def health(): return {"status": "ok"} diff --git a/api/routers/home.py b/api/routers/home.py index 15fd536..70a5abc 100644 --- a/api/routers/home.py +++ b/api/routers/home.py @@ -11,7 +11,7 @@ router = APIRouter(tags=["home"]) _STATIC_DIR = Path(__file__).resolve().parent.parent / "static" -@router.get("/home", response_class=HTMLResponse) +@router.get("/", response_class=HTMLResponse) async def get_home(): """ 应用官网主页