From 06e033553184cbc244fc1711333fb714dd60a6f4 Mon Sep 17 00:00:00 2001 From: xyj <10908227994@qq.com> Date: Fri, 26 Jan 2024 09:15:19 +0800 Subject: [PATCH] update --- xumu.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/xumu.py b/xumu.py index 8a9ad1f..b8bd880 100644 --- a/xumu.py +++ b/xumu.py @@ -19,13 +19,6 @@ class BaseResponse(BaseModel): data: Any = None -# 设备注册实体 -class Device(BaseModel): - iccid: str = "" - deviceId: str - type: int = None - - @app.get("/api/xumu/video") async def data_query(username): return BaseResponse(data=get_video_url(username)) @@ -132,9 +125,7 @@ async def register(request: Request): iccid = payload["cid"] type = payload["t"] # 该设备是否已经创建 - device = Device(iccid=iccid, deviceId=deviceId, type=type) - a_device = await get_device(device) - print(a_device) + a_device = await get_device(iccid, deviceId) if a_device.code == 200: v = a_device.data["values"] if len(v) != 0: @@ -159,7 +150,6 @@ async def register(request: Request): } r = requests.post(baseHost + nonQueryUri, headers=headers, json=send_json) res.append(r.json()) - print(res) return BaseResponse(data=res) except Exception as e: return BaseResponse(code=500, msg=str(e))