From ea7a7ef2999c7e88b3e8bdae5ef2e2018786f5d4 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Sat, 27 Jul 2019 09:24:23 +0200 Subject: [PATCH] src/bin/proxmox-backup-client.rs: fixup - correctly pass prune parameters --- src/bin/proxmox-backup-client.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/bin/proxmox-backup-client.rs b/src/bin/proxmox-backup-client.rs index 50077260..2fa5cb08 100644 --- a/src/bin/proxmox-backup-client.rs +++ b/src/bin/proxmox-backup-client.rs @@ -840,7 +840,7 @@ fn upload_log( } fn prune( - param: Value, + mut param: Value, _info: &ApiMethod, _rpcenv: &mut dyn RpcEnvironment, ) -> Result { @@ -854,11 +854,13 @@ fn prune( let group = tools::required_string_param(¶m, "group")?; let group = BackupGroup::parse(group)?; - let mut args = json!({}); - args["backup-type"] = group.backup_type().into(); - args["backup-id"] = group.backup_id().into(); + param.as_object_mut().unwrap().remove("repository"); + param.as_object_mut().unwrap().remove("group"); - 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);