api2: update for latest proxmox-api changes

- rename ApiFuture into ApiResponseFuture
- impl. ApiHandler::Async
This commit is contained in:
Dietmar Maurer
2019-12-16 10:01:51 +01:00
parent 236a396aa1
commit bb084b9c91
6 changed files with 26 additions and 20 deletions
+4 -4
View File
@@ -7,7 +7,7 @@ use serde_json::{json, Value};
use proxmox::{sortable, identity};
use proxmox::api::list_subdirs_api_method;
use proxmox::api::{ApiFuture, ApiHandler, ApiMethod, Router, RpcEnvironment};
use proxmox::api::{ApiResponseFuture, ApiHandler, ApiMethod, Router, RpcEnvironment};
use proxmox::api::router::SubdirMap;
use proxmox::api::schema::*;
@@ -47,7 +47,7 @@ fn upgrade_to_backup_protocol(
param: Value,
_info: &ApiMethod,
rpcenv: Box<dyn RpcEnvironment>,
) -> ApiFuture {
) -> ApiResponseFuture {
async move {
let debug = param["debug"].as_bool().unwrap_or(false);
@@ -574,7 +574,7 @@ fn dynamic_chunk_index(
param: Value,
_info: &ApiMethod,
rpcenv: Box<dyn RpcEnvironment>,
) -> ApiFuture {
) -> ApiResponseFuture {
async move {
let env: &BackupEnvironment = rpcenv.as_ref();
@@ -649,7 +649,7 @@ fn fixed_chunk_index(
param: Value,
_info: &ApiMethod,
rpcenv: Box<dyn RpcEnvironment>,
) -> ApiFuture {
) -> ApiResponseFuture {
async move {
let env: &BackupEnvironment = rpcenv.as_ref();