proxmox-backup/src/api2/config.rs
Wolfgang Bumiller 062d4916ff api_schema: allow generic api handler functions
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-04-16 11:22:23 +02:00

23 lines
449 B
Rust

//use failure::*;
//use std::collections::HashMap;
use crate::api_schema::*;
use crate::api_schema::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
}