api: config: acme: rustfmt
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
a9df9df25d
commit
c1a1e1ae8f
@ -10,7 +10,7 @@ use serde::{Deserialize, Serialize};
|
|||||||
use serde_json::{json, Value};
|
use serde_json::{json, Value};
|
||||||
|
|
||||||
use proxmox_router::{
|
use proxmox_router::{
|
||||||
http_bail, list_subdirs_api_method, Permission, Router, SubdirMap, RpcEnvironment,
|
http_bail, list_subdirs_api_method, Permission, Router, RpcEnvironment, SubdirMap,
|
||||||
};
|
};
|
||||||
use proxmox_schema::api;
|
use proxmox_schema::api;
|
||||||
|
|
||||||
@ -336,7 +336,8 @@ pub fn deactivate_account(
|
|||||||
task_warn!(
|
task_warn!(
|
||||||
worker,
|
worker,
|
||||||
"error deactivating account {}, proceedeing anyway - {}",
|
"error deactivating account {}, proceedeing anyway - {}",
|
||||||
name, err,
|
name,
|
||||||
|
err,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -630,7 +631,7 @@ pub fn delete_plugin(id: String) -> Result<(), Error> {
|
|||||||
|
|
||||||
#[api()]
|
#[api()]
|
||||||
#[derive(Serialize, Deserialize)]
|
#[derive(Serialize, Deserialize)]
|
||||||
#[serde(rename_all="kebab-case")]
|
#[serde(rename_all = "kebab-case")]
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
/// Deletable property name
|
/// Deletable property name
|
||||||
pub enum DeletableProperty {
|
pub enum DeletableProperty {
|
||||||
@ -709,16 +710,27 @@ pub fn update_plugin(
|
|||||||
if let Some(delete) = delete {
|
if let Some(delete) = delete {
|
||||||
for delete_prop in delete {
|
for delete_prop in delete {
|
||||||
match delete_prop {
|
match delete_prop {
|
||||||
DeletableProperty::validation_delay => { plugin.core.validation_delay = None; },
|
DeletableProperty::validation_delay => {
|
||||||
DeletableProperty::disable => { plugin.core.disable = None; },
|
plugin.core.validation_delay = None;
|
||||||
|
}
|
||||||
|
DeletableProperty::disable => {
|
||||||
|
plugin.core.disable = None;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let Some(data) = data { plugin.data = data; }
|
}
|
||||||
if let Some(api) = update.api { plugin.core.api = api; }
|
if let Some(data) = data {
|
||||||
if update.validation_delay.is_some() { plugin.core.validation_delay = update.validation_delay; }
|
plugin.data = data;
|
||||||
if update.disable.is_some() { plugin.core.disable = update.disable; }
|
}
|
||||||
|
if let Some(api) = update.api {
|
||||||
|
plugin.core.api = api;
|
||||||
|
}
|
||||||
|
if update.validation_delay.is_some() {
|
||||||
|
plugin.core.validation_delay = update.validation_delay;
|
||||||
|
}
|
||||||
|
if update.disable.is_some() {
|
||||||
|
plugin.core.disable = update.disable;
|
||||||
|
}
|
||||||
|
|
||||||
*entry = serde_json::to_value(plugin)?;
|
*entry = serde_json::to_value(plugin)?;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user