parameter name cleanups (use '-' instead of '_')
This commit is contained in:
@ -308,9 +308,9 @@ fn get_backup_list(
|
||||
|
||||
for info in datastore.list_backups()? {
|
||||
list.push(json!({
|
||||
"backup_type": info.backup_dir.group.backup_type,
|
||||
"backup_id": info.backup_dir.group.backup_id,
|
||||
"backup_time": info.backup_dir.backup_time.timestamp(),
|
||||
"backup-type": info.backup_dir.group.backup_type,
|
||||
"backup-id": info.backup_dir.group.backup_id,
|
||||
"backup-time": info.backup_dir.backup_time.timestamp(),
|
||||
"files": info.files,
|
||||
}));
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ fn upload_catar(
|
||||
) -> Result<BoxFut, Error> {
|
||||
|
||||
let store = tools::required_string_param(¶m, "store")?;
|
||||
let mut archive_name = String::from(tools::required_string_param(¶m, "archive_name")?);
|
||||
let mut archive_name = String::from(tools::required_string_param(¶m, "archive-name")?);
|
||||
|
||||
if !archive_name.ends_with(".catar") {
|
||||
bail!("got wront file extension (expected '.catar')");
|
||||
@ -108,7 +108,7 @@ pub fn api_method_upload_catar() -> ApiAsyncMethod {
|
||||
upload_catar,
|
||||
ObjectSchema::new("Upload .catar backup file.")
|
||||
.required("store", StringSchema::new("Datastore name."))
|
||||
.required("archive_name", StringSchema::new("Backup archive name."))
|
||||
.required("archive-name", StringSchema::new("Backup archive name."))
|
||||
.required("type", StringSchema::new("Backup type.")
|
||||
.format(Arc::new(ApiStringFormat::Enum(vec!["ct".into(), "host".into()]))))
|
||||
.required("id", StringSchema::new("Backup ID."))
|
||||
@ -133,7 +133,7 @@ fn download_catar(
|
||||
) -> Result<BoxFut, Error> {
|
||||
|
||||
let store = tools::required_string_param(¶m, "store")?;
|
||||
let archive_name = tools::required_string_param(¶m, "archive_name")?;
|
||||
let archive_name = tools::required_string_param(¶m, "archive-name")?;
|
||||
|
||||
let backup_type = tools::required_string_param(¶m, "type")?;
|
||||
let backup_id = tools::required_string_param(¶m, "id")?;
|
||||
@ -177,7 +177,7 @@ pub fn api_method_download_catar() -> ApiAsyncMethod {
|
||||
download_catar,
|
||||
ObjectSchema::new("Download .catar backup file.")
|
||||
.required("store", StringSchema::new("Datastore name."))
|
||||
.required("archive_name", StringSchema::new("Backup archive name."))
|
||||
.required("archive-name", StringSchema::new("Backup archive name."))
|
||||
.required("type", StringSchema::new("Backup type.")
|
||||
.format(Arc::new(ApiStringFormat::Enum(vec!["ct".into(), "host".into()]))))
|
||||
.required("id", StringSchema::new("Backup ID."))
|
||||
|
Reference in New Issue
Block a user