fix: update ip address in cache
All checks were successful
Build and Push Docker Image / Build And Push Docker Image (push) Successful in 26s

This commit is contained in:
Tim Wundenberg
2024-09-26 16:23:24 +02:00
parent a172e0c459
commit 848877270d

View File

@@ -47,7 +47,7 @@ fn update_and_get_cache(
zone_id: &str, zone_id: &str,
domain: &str, domain: &str,
) -> Result<CloudflareDnsEntry, Error> { ) -> Result<CloudflareDnsEntry, Error> {
let result = match cache { let mut result = match cache {
Some(entry) => entry, Some(entry) => entry,
None => get_id_and_content_of_dns(token, zone_id, domain)?, None => get_id_and_content_of_dns(token, zone_id, domain)?,
}; };
@@ -58,6 +58,7 @@ fn update_and_get_cache(
info!("Not updating IP Address"); info!("Not updating IP Address");
} else { } else {
update_ip_address(token, zone_id, &current_ip_address, domain, &result.id)?; update_ip_address(token, zone_id, &current_ip_address, domain, &result.id)?;
result.ip_address = current_ip_address;
} }
Ok(result) Ok(result)