From d2debb56d30a10ed9180b8c62632e6f54a88716c Mon Sep 17 00:00:00 2001 From: shikong <919411476@qq.com> Date: Thu, 1 Aug 2024 20:41:23 +0800 Subject: [PATCH] =?UTF-8?q?fastapi=20=E5=B0=81=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index fd41b8a..051944c 100644 --- a/main.py +++ b/main.py @@ -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)