From 5de0044890adf8c4f08e3067451502ffe569cc49 Mon Sep 17 00:00:00 2001 From: xyj <10908227994@qq.com> Date: Mon, 18 Dec 2023 11:19:29 +0800 Subject: [PATCH] update --- tool.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tool.py b/tool.py index a69092a..5b5fe30 100755 --- a/tool.py +++ b/tool.py @@ -9,14 +9,12 @@ from pydantic import BaseModel from config import mp4_path, post_record_list_url, post_record_url, info_topic -class BaseResponse: - code: int - msg: str - - # 统一返回 def publish_payload(code, msg): - return json.dumps(BaseResponse(code=code, msg=msg), ensure_ascii=False) + return json.dumps({ + "code": code, + "msg": msg + }, ensure_ascii=False) def exception_handler(func):