From 9e428c2eb2023d6b216aced789f877bc2f5ed59f Mon Sep 17 00:00:00 2001 From: Sibuxiangx Date: Sun, 3 Aug 2025 17:04:32 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=E4=BF=AE=E5=A4=8D=EF=BC=9Adebug?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E6=97=B6=E5=85=B3=E9=97=AD=E5=86=85=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E6=A1=A3=EF=BC=8C=E5=8A=A0=E5=85=A5=E6=A0=B9=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main.py b/main.py index 385bd07..f41dbeb 100644 --- a/main.py +++ b/main.py @@ -50,6 +50,9 @@ app = FastAPI( description=app_config.description, version=app_config.version, debug=app_config.debug, + docs_url=None if not app_config.debug else "/docs", + redoc_url=None if not app_config.debug else "/redoc", + openapi_url=None if not app_config.debug else "/openapi.json", ) # CORS配置 @@ -60,6 +63,11 @@ app.add_middleware( allow_methods=app_config.cors_allow_methods, allow_headers=app_config.cors_allow_headers, ) + +@app.get("/") +async def root(): + return {"message": "Hello World"} + app.include_router(invite_router) app.include_router(jwc_router) app.include_router(login_router)