From 700eac107887fa837dc3c505988d0dc5d480b198 Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Sat, 6 Sep 2025 13:07:38 +0200 Subject: [PATCH] feat: do not use empty username or password --- src/http_client.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/http_client.rs b/src/http_client.rs index 1c9ad06..b87e20e 100644 --- a/src/http_client.rs +++ b/src/http_client.rs @@ -47,8 +47,8 @@ impl HttpClient { .client .post(format!("{}/mtb/etl/patient-record", &self.base_url)) .basic_auth( - &self.username.clone().unwrap_or_default(), - Some(self.password.clone().unwrap_or_default()), + self.username.clone().unwrap_or("anonymous".to_string()), + self.password.clone(), ) .timeout(Duration::from_secs(5)) .json(&mtb) @@ -70,8 +70,8 @@ impl HttpClient { .client .delete(format!("{}/mtb/etl/patient/{}", &self.base_url, patient_id)) .basic_auth( - &self.username.clone().unwrap_or_default(), - Some(self.password.clone().unwrap_or_default()), + self.username.clone().unwrap_or("anonymous".to_string()), + self.password.clone(), ) .timeout(Duration::from_secs(5)) .send()