From 9685db79be269962a24eeb098e6b09511cd1971c Mon Sep 17 00:00:00 2001 From: zhl Date: Tue, 30 Nov 2021 20:20:30 +0800 Subject: [PATCH] add get method of check workd --- main.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main.py b/main.py index f94f836..bea4db3 100644 --- a/main.py +++ b/main.py @@ -36,12 +36,21 @@ async def check_with_local(item: Item): res_local = check_local(item.content) return res_local +@app.get("/check_local/{content}") +async def check_with_local(content: str): + res_local = check_local(content) + return res_local + @app.post("/replace_local") async def replace_with_local(item: Item): res_local = replace_local(item.content) return res_local +@app.get("/replace_local/{content}") +async def replace_with_local(content: str): + res_local = replace_local(content) + return res_local # @app.post("/begin_task") # async def begin_task(item: Item, background_tasks: BackgroundTasks):