switch from hardware object to string

and replace mac address to disk serial number
for more predictable hash key
This commit is contained in:
Alex Bezdieniezhnykh
2025-05-02 09:41:04 +03:00
parent 28069f63f9
commit 59eb39d447
7 changed files with 16 additions and 50 deletions
+3 -3
View File
@@ -8,7 +8,7 @@ cimport constants
import yaml
from cdn_manager cimport CDNManager, CDNCredentials
from hardware_service cimport HardwareService, HardwareInfo
from hardware_service cimport HardwareService
from security cimport Security
from user cimport User, RoleEnum
@@ -85,7 +85,7 @@ cdef class ApiClient:
cdef load_bytes(self, str filename, str folder):
hardware_service = HardwareService()
cdef HardwareInfo hardware = hardware_service.get_hardware_info()
cdef str hardware = hardware_service.get_hardware_info()
if self.token is None:
self.login()
@@ -98,7 +98,7 @@ cdef class ApiClient:
payload = json.dumps(
{
"password": self.credentials.password,
"hardware": hardware.to_json_object(),
"hardware": hardware,
"fileName": filename
}, indent=4)
response = requests.post(url, data=payload, headers=headers, stream=True)