backup-client: use () instead of Value as return type
shorter and we do a conversion anyway Signed-off-by: Dominik Csapak <d.csapak@proxmox.com> Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
342ed4aea0
commit
9b5ecbe2ff
|
@ -377,7 +377,7 @@ async fn update_notes(param: Value) -> Result<Value, Error> {
|
|||
}
|
||||
)]
|
||||
/// Show protection status of the specified snapshot
|
||||
async fn show_protection(param: Value) -> Result<Value, Error> {
|
||||
async fn show_protection(param: Value) -> Result<(), Error> {
|
||||
let repo = extract_repository_from_value(¶m)?;
|
||||
let path = required_string_param(¶m, "snapshot")?;
|
||||
|
||||
|
@ -411,7 +411,7 @@ async fn show_protection(param: Value) -> Result<Value, Error> {
|
|||
);
|
||||
}
|
||||
|
||||
Ok(Value::Null)
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[api(
|
||||
|
@ -433,7 +433,7 @@ async fn show_protection(param: Value) -> Result<Value, Error> {
|
|||
}
|
||||
)]
|
||||
/// Update Protection Status of a snapshot
|
||||
async fn update_protection(protected: bool, param: Value) -> Result<Value, Error> {
|
||||
async fn update_protection(protected: bool, param: Value) -> Result<(), Error> {
|
||||
let repo = extract_repository_from_value(¶m)?;
|
||||
let path = required_string_param(¶m, "snapshot")?;
|
||||
|
||||
|
@ -451,7 +451,7 @@ async fn update_protection(protected: bool, param: Value) -> Result<Value, Error
|
|||
|
||||
client.put(&path, Some(args)).await?;
|
||||
|
||||
Ok(Value::Null)
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn protected_cli() -> CliCommandMap {
|
||||
|
|
Loading…
Reference in New Issue