bin: use extract_output_format where necessary
else we sometimes forget to remove it from the 'params' variable and use that further, running into 'invalid parameter' errors found by giving 'output-format' paramter to proxmox-tape status Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
f0d23e5370
commit
671c6a96e7
@ -1266,13 +1266,12 @@ async fn prune_async(mut param: Value) -> Result<Value, Error> {
|
||||
let group = tools::required_string_param(¶m, "group")?;
|
||||
let group: BackupGroup = group.parse()?;
|
||||
|
||||
let output_format = get_output_format(¶m);
|
||||
let output_format = extract_output_format(&mut param);
|
||||
|
||||
let quiet = param["quiet"].as_bool().unwrap_or(false);
|
||||
|
||||
param.as_object_mut().unwrap().remove("repository");
|
||||
param.as_object_mut().unwrap().remove("group");
|
||||
param.as_object_mut().unwrap().remove("output-format");
|
||||
param.as_object_mut().unwrap().remove("quiet");
|
||||
|
||||
param["backup-type"] = group.backup_type().into();
|
||||
|
Reference in New Issue
Block a user