mirror of
https://github.com/azaion/loader.git
synced 2026-04-22 14:06:34 +00:00
Add E2E tests, fix bugs
Made-with: Cursor
This commit is contained in:
@@ -41,6 +41,8 @@ cdef class ApiClient:
|
||||
self.cdn_manager = CDNManager(creds)
|
||||
|
||||
cdef login(self):
|
||||
if self.credentials is None:
|
||||
raise Exception("No credentials set")
|
||||
response = None
|
||||
try:
|
||||
response = requests.post(f"{self.api_url}/login",
|
||||
@@ -112,6 +114,8 @@ cdef class ApiClient:
|
||||
response = self.request('post', f'{self.api_url}/resources/check', payload, is_stream=False)
|
||||
|
||||
cdef load_bytes(self, str filename, str folder):
|
||||
if self.credentials is None:
|
||||
raise Exception("No credentials set")
|
||||
cdef str hardware = HardwareService.get_hardware_info()
|
||||
hw_hash = Security.get_hw_hash(hardware)
|
||||
key = Security.get_api_encryption_key(self.credentials, hw_hash)
|
||||
|
||||
Reference in New Issue
Block a user