This commit is contained in:
xyj 2024-01-25 10:50:29 +08:00
parent bafd5eb5ac
commit 3811de2827
1 changed files with 3 additions and 1 deletions

View File

@ -146,8 +146,10 @@ async def process_data(request: Request):
return BaseResponse(code=301, msg="data valid error") return BaseResponse(code=301, msg="data valid error")
m = payload["m"] m = payload["m"]
v = payload["v"] v = payload["v"]
t = payload["t"]
cid = v[0] cid = v[0]
t = v[-1] m.append("t")
v.append(t)
send_json = { send_json = {
"devices": ["root.farm." + cid], "devices": ["root.farm." + cid],
"timestamps": [int(time.time() * 1000)], "timestamps": [int(time.time() * 1000)],