add get method of check workd

This commit is contained in:
zhl 2021-11-30 20:20:30 +08:00
parent 804f34610d
commit 9685db79be

View File

@ -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):