fastapi 封装

This commit is contained in:
shikong 2024-08-01 20:41:23 +08:00
parent 546b6caa90
commit d2debb56d3
Signed by: Shikong
GPG Key ID: BD85FF18B373C341

View File

@ -60,9 +60,9 @@ def get_device_size(item: Device):
#
@app.post("/task/app/douyin")
def douyin_task(item: Device):
async def douyin_task(item: Device):
if item.serial not in devices:
return {"error": "设备 {} 不存在".format(item.serial)}
return Response(code=500, msg="设备 {} 不存在".format(item.serial))
d = devices[item.serial]
d.app_start("com.ss.android.ugc.aweme", stop=False)