diff --git a/proxmox-acme-api/src/account_api_impl.rs b/proxmox-acme-api/src/account_api_impl.rs index 27d30ba9..71880e62 100644 --- a/proxmox-acme-api/src/account_api_impl.rs +++ b/proxmox-acme-api/src/account_api_impl.rs @@ -55,9 +55,12 @@ pub async fn register_account( name: &AcmeAccountName, contact: String, tos_url: Option, - directory_url: String, + directory_url: Option, eab_creds: Option<(String, String)>, ) -> Result { + let directory_url = + directory_url.unwrap_or_else(|| DEFAULT_ACME_DIRECTORY_ENTRY.url.to_string()); + let mut client = AcmeClient::new(directory_url.clone()); let contact = account_contact_from_string(&contact); @@ -104,10 +107,7 @@ pub async fn deactivate_account( Ok(()) } -pub async fn update_account( - name: &AcmeAccountName, - contact: Option, -) -> Result<(), Error> { +pub async fn update_account(name: &AcmeAccountName, contact: Option) -> Result<(), Error> { let mut account_data = super::account_config::load_account_config(name).await?; let mut client = account_data.client();