rename api3 back to api2

There is no real need to change the path, so using api2 we can reuse
all helpers (like tools from proxmox widget toolkit).
This commit is contained in:
Dietmar Maurer
2019-01-22 12:10:38 +01:00
parent b0ee976fbf
commit 576e3bf252
14 changed files with 14 additions and 156 deletions

22
src/api2/config.rs Normal file
View File

@ -0,0 +1,22 @@
//use failure::*;
//use std::collections::HashMap;
use crate::api::schema::*;
use crate::api::router::*;
use serde_json::{json};
pub mod datastore;
pub fn router() -> Router {
let route = Router::new()
.get(ApiMethod::new(
|_,_| Ok(json!([
{"subdir": "datastore"}
])),
ObjectSchema::new("Directory index.")))
.subdir("datastore", datastore::router());
route
}