mirror of
https://git.proxmox.com/git/proxmox
synced 2025-07-09 09:07:45 +00:00
acme-api: make register_account directory parameter optional
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
This commit is contained in:
parent
95ea61183f
commit
c5731f916b
@ -55,9 +55,12 @@ pub async fn register_account(
|
|||||||
name: &AcmeAccountName,
|
name: &AcmeAccountName,
|
||||||
contact: String,
|
contact: String,
|
||||||
tos_url: Option<String>,
|
tos_url: Option<String>,
|
||||||
directory_url: String,
|
directory_url: Option<String>,
|
||||||
eab_creds: Option<(String, String)>,
|
eab_creds: Option<(String, String)>,
|
||||||
) -> Result<String, Error> {
|
) -> Result<String, Error> {
|
||||||
|
let directory_url =
|
||||||
|
directory_url.unwrap_or_else(|| DEFAULT_ACME_DIRECTORY_ENTRY.url.to_string());
|
||||||
|
|
||||||
let mut client = AcmeClient::new(directory_url.clone());
|
let mut client = AcmeClient::new(directory_url.clone());
|
||||||
|
|
||||||
let contact = account_contact_from_string(&contact);
|
let contact = account_contact_from_string(&contact);
|
||||||
@ -104,10 +107,7 @@ pub async fn deactivate_account(
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn update_account(
|
pub async fn update_account(name: &AcmeAccountName, contact: Option<String>) -> Result<(), Error> {
|
||||||
name: &AcmeAccountName,
|
|
||||||
contact: Option<String>,
|
|
||||||
) -> Result<(), Error> {
|
|
||||||
let mut account_data = super::account_config::load_account_config(name).await?;
|
let mut account_data = super::account_config::load_account_config(name).await?;
|
||||||
let mut client = account_data.client();
|
let mut client = account_data.client();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user