update
This commit is contained in:
parent
42ad6f07ac
commit
6835697380
6
xumu.py
6
xumu.py
|
@ -1,3 +1,4 @@
|
|||
import re
|
||||
import time
|
||||
import json
|
||||
from typing import Any
|
||||
|
@ -261,8 +262,9 @@ async def process_data(request: Request):
|
|||
data = json.loads(data)
|
||||
event = data["event"]
|
||||
clientid = data["clientid"]
|
||||
print(clientid)
|
||||
if (not str(clientid).startswith("farm")) and (not str(clientid).startswith("test")):
|
||||
pattern = r"test"
|
||||
a = re.match(pattern, clientid)
|
||||
if not a:
|
||||
return BaseResponse(code=500, msg="不符合畜牧clientId")
|
||||
# 连接成功处理
|
||||
if event == "client.connected":
|
||||
|
|
Loading…
Reference in New Issue