update
This commit is contained in:
parent
455376463d
commit
9d6cb02c63
4
xumu.py
4
xumu.py
|
@ -264,9 +264,11 @@ async def process_data(request: Request):
|
||||||
clientid = data["clientid"]
|
clientid = data["clientid"]
|
||||||
pattern = r'^farm_[a-zA-Z0-9]{12}$'
|
pattern = r'^farm_[a-zA-Z0-9]{12}$'
|
||||||
amatch1 = re.match(pattern, clientid)
|
amatch1 = re.match(pattern, clientid)
|
||||||
|
print(amatch1)
|
||||||
pattern = r'^test'
|
pattern = r'^test'
|
||||||
amatch2 = re.match(pattern, clientid)
|
amatch2 = re.match(pattern, clientid)
|
||||||
if not amatch1 and not amatch2:
|
print(amatch2)
|
||||||
|
if not amatch1 or not amatch2:
|
||||||
return BaseResponse(code=500, msg="不符合畜牧clientId")
|
return BaseResponse(code=500, msg="不符合畜牧clientId")
|
||||||
# 连接成功处理
|
# 连接成功处理
|
||||||
if event == "client.connected":
|
if event == "client.connected":
|
||||||
|
|
Loading…
Reference in New Issue