add auth check

This commit is contained in:
2026-08-03 11:16:49 +08:00
parent 6330b99860
commit 92780cedef
18 changed files with 381 additions and 242 deletions
+2 -5
View File
@@ -130,15 +130,12 @@ def parse_identification_config_csv(csv_text: str) -> dict:
def download_identification_config(timeout=20) -> dict:
"""Download the current customer's CSV config through the cloud server."""
import requests
from api import data_record_url, the_folder
from api import device_post
try:
response = requests.post(data_record_url, json={
result = device_post({
"type": "getIdentificationConfig",
"deviceId": the_folder,
}, timeout=timeout)
response.raise_for_status()
result = response.json()
except Exception as exc:
raise ValueError(f"连接云服务器辨识配置服务失败: {exc}") from exc