api: rename h2upload to backup
This commit is contained in:
parent
d906b1124f
commit
ca60c371e2
|
@ -20,7 +20,7 @@ use crate::server::WorkerTask;
|
|||
|
||||
mod pxar;
|
||||
mod upload;
|
||||
mod h2upload;
|
||||
mod backup;
|
||||
|
||||
fn group_backups(backup_list: Vec<BackupInfo>) -> HashMap<String, Vec<BackupInfo>> {
|
||||
|
||||
|
@ -405,9 +405,9 @@ pub fn router() -> Router {
|
|||
Router::new()
|
||||
.upgrade(upload::api_method_upgrade_upload()))
|
||||
.subdir(
|
||||
"h2upload",
|
||||
"backup",
|
||||
Router::new()
|
||||
.upgrade(h2upload::api_method_upgrade_h2upload()))
|
||||
.upgrade(backup::api_method_upgrade_backup()))
|
||||
.subdir(
|
||||
"gc",
|
||||
Router::new()
|
||||
|
|
|
@ -17,10 +17,10 @@ use crate::api_schema::*;
|
|||
use crate::server::formatter::*;
|
||||
use crate::server::WorkerTask;
|
||||
|
||||
pub fn api_method_upgrade_h2upload() -> ApiAsyncMethod {
|
||||
pub fn api_method_upgrade_backup() -> ApiAsyncMethod {
|
||||
ApiAsyncMethod::new(
|
||||
upgrade_h2upload,
|
||||
ObjectSchema::new("Experimental h2 server")
|
||||
ObjectSchema::new("Upgraded to backup protocol.")
|
||||
.required("store", StringSchema::new("Datastore name.")),
|
||||
)
|
||||
}
|
|
@ -50,7 +50,7 @@ fn run() -> Result<(), Error> {
|
|||
|
||||
let mut client = HttpClient::new(host, username)?;
|
||||
|
||||
let h2client = client.h2upgrade("/api2/json/admin/datastore/store2/h2upload");
|
||||
let h2client = client.h2upgrade("/api2/json/admin/datastore/store2/backup");
|
||||
|
||||
let res = h2client.and_then(|mut h2| {
|
||||
println!("start http2");
|
||||
|
|
Loading…
Reference in New Issue