From 848877270d736ef250f998f5a8556a1e23a8f6f0 Mon Sep 17 00:00:00 2001 From: Tim Wundenberg Date: Thu, 26 Sep 2024 16:23:24 +0200 Subject: [PATCH] fix: update ip address in cache --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index d4e8e0f..d1375e2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -47,7 +47,7 @@ fn update_and_get_cache( zone_id: &str, domain: &str, ) -> Result { - let result = match cache { + let mut result = match cache { Some(entry) => entry, 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"); } else { update_ip_address(token, zone_id, ¤t_ip_address, domain, &result.id)?; + result.ip_address = current_ip_address; } Ok(result)