From b1511d5888e966f8ceed1d1eea99a886d0095c17 Mon Sep 17 00:00:00 2001 From: "xiao.xiong" Date: Mon, 20 Oct 2025 00:13:39 +0800 Subject: [PATCH] update --- apps/socket/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/socket/app.py b/apps/socket/app.py index 0fc7be8..30412d0 100644 --- a/apps/socket/app.py +++ b/apps/socket/app.py @@ -19,7 +19,7 @@ async def test(): # 在这里添加你的test函数逻辑 return {"message": "test function executed"} -@app.get("/api/router") +@app.all("/api/router") async def router(path: str = Query(...)): """路由处理器""" try: @@ -36,7 +36,7 @@ async def router(path: str = Query(...)): except Exception as e: return {"success": False, "error": str(e)} -@app.get("/") +@app.all("/") async def root(): """健康检查端点""" return {"message": "FastAPI server is running"}