diff --git a/src/api2/config/remote.rs b/src/api2/config/remote.rs index 7fc45c41..1bc00fed 100644 --- a/src/api2/config/remote.rs +++ b/src/api2/config/remote.rs @@ -124,11 +124,14 @@ pub fn create_remote(param: Value) -> Result<(), Error> { } )] /// Read remote configuration data. -pub fn read_remote(name: String) -> Result { +pub fn read_remote( + name: String, + _info: &ApiMethod, + mut rpcenv: &mut dyn RpcEnvironment, +) -> Result { let (config, digest) = remote::config()?; let mut data = config.lookup_json("remote", &name)?; - data.as_object_mut().unwrap() - .insert("digest".into(), proxmox::tools::digest_to_hex(&digest).into()); + rpcenv["digest"] = proxmox::tools::digest_to_hex(&digest).into(); Ok(data) }