changed api endpoints register and hardware-infor

This commit is contained in:
2025-10-03 23:53:26 +02:00
parent bfeb43f38a
commit 8e6e291f6a
2 changed files with 5 additions and 2 deletions

View File

@@ -108,7 +108,7 @@ async fn get_server_id_by_ip(
.danger_accept_invalid_certs(true)
.build()?;
let url = format!("{}/monitoring/server-id-by-ip?ipAddress={}", base_url, ip);
let url = format!("{}/monitoring/register?ipAddress={}", base_url, ip);
loop {
println!("Attempting to fetch server ID for IP {}...", ip);

View File

@@ -90,7 +90,10 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
// Registration with backend server
let (server_id, ip) = match api::register_with_server(&server_url).await {
Ok((id, ip)) => (id, ip),
Ok((id, ip)) => {
println!("Registered with server. ID: {}, IP: {}", id, ip);
(id, ip)
},
Err(e) => {
eprintln!("Fehler bei der Registrierung am Server: {e}");
return Err(e);