mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 13:16:30 +00:00
switch from hardware object to string
and replace mac address to disk serial number for more predictable hash key
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user