added missing client statement in register server
This commit is contained in:
@@ -185,6 +185,11 @@ async fn register_with_server(base_url: &str) -> Result<(i32, String), Box<dyn E
|
||||
// First get local IP
|
||||
let ip = local_ip_address::local_ip()?.to_string();
|
||||
|
||||
// Create HTTP client
|
||||
let client = Client::builder()
|
||||
.danger_accept_invalid_certs(true)
|
||||
.build()?;
|
||||
|
||||
// Get server ID from backend
|
||||
let (server_id, registered_ip) = get_server_id_by_ip(base_url, &ip).await?;
|
||||
|
||||
@@ -194,7 +199,7 @@ async fn register_with_server(base_url: &str) -> Result<(i32, String), Box<dyn E
|
||||
// Send registration data
|
||||
let registration = RegistrationDto {
|
||||
id: server_id,
|
||||
ip_address: registered_ip,
|
||||
ip_address: registered_ip.clone(),
|
||||
cpu_type: hardware.cpu_type,
|
||||
cpu_cores: hardware.cpu_cores,
|
||||
gpu_type: hardware.gpu_type,
|
||||
|
Reference in New Issue
Block a user