src/bin/proxmox-backup-client.rs: fixup - correctly pass prune parameters
This commit is contained in:
parent
9fdc3ef46f
commit
ea7a7ef299
|
@ -840,7 +840,7 @@ fn upload_log(
|
||||||
}
|
}
|
||||||
|
|
||||||
fn prune(
|
fn prune(
|
||||||
param: Value,
|
mut param: Value,
|
||||||
_info: &ApiMethod,
|
_info: &ApiMethod,
|
||||||
_rpcenv: &mut dyn RpcEnvironment,
|
_rpcenv: &mut dyn RpcEnvironment,
|
||||||
) -> Result<Value, Error> {
|
) -> Result<Value, Error> {
|
||||||
|
@ -854,11 +854,13 @@ fn prune(
|
||||||
let group = tools::required_string_param(¶m, "group")?;
|
let group = tools::required_string_param(¶m, "group")?;
|
||||||
let group = BackupGroup::parse(group)?;
|
let group = BackupGroup::parse(group)?;
|
||||||
|
|
||||||
let mut args = json!({});
|
param.as_object_mut().unwrap().remove("repository");
|
||||||
args["backup-type"] = group.backup_type().into();
|
param.as_object_mut().unwrap().remove("group");
|
||||||
args["backup-id"] = group.backup_id().into();
|
|
||||||
|
|
||||||
let result = client.post(&path, Some(args)).wait()?;
|
param["backup-type"] = group.backup_type().into();
|
||||||
|
param["backup-id"] = group.backup_id().into();
|
||||||
|
|
||||||
|
let result = client.post(&path, Some(param)).wait()?;
|
||||||
|
|
||||||
record_repository(&repo);
|
record_repository(&repo);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue