update
This commit is contained in:
parent
639d9f61cb
commit
5de0044890
10
tool.py
10
tool.py
|
@ -9,14 +9,12 @@ from pydantic import BaseModel
|
||||||
from config import mp4_path, post_record_list_url, post_record_url, info_topic
|
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):
|
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):
|
def exception_handler(func):
|
||||||
|
|
Loading…
Reference in New Issue