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