feat: 在线状态增加版本号

feat: 在线状态增加版本号
pull/595/head
HYY 2025-03-26 15:03:09 +08:00 committed by GitHub
commit e14ab298d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 4 deletions

View File

@ -54,7 +54,9 @@ def send_heartbeat(server_url, client_id):
sys = platform.system()
try:
headers = {"Client-ID": client_id, "User-Agent": f"HeartbeatClient/{client_id[:8]}"}
data = json.dumps({"system": sys})
data = json.dumps(
{"system": sys, "Version": global_config.MAI_VERSION},
)
response = requests.post(f"{server_url}/api/clients", headers=headers, data=data)
if response.status_code == 201: