proxmox-backup/src/api2/config.rs

23 lines
445 B
Rust
Raw Normal View History

2018-12-08 13:55:54 +00:00
//use failure::*;
//use std::collections::HashMap;
2018-12-08 13:44:55 +00:00
use crate::api::schema::*;
use crate::api::router::*;
2018-12-08 13:55:54 +00:00
use serde_json::{json};
2018-12-08 13:44:55 +00:00
pub mod datastore;
2018-12-08 13:44:55 +00:00
pub fn router() -> Router {
let route = Router::new()
.get(ApiMethod::new(
|_,_| Ok(json!([
{"subdir": "datastore"}
])),
ObjectSchema::new("Directory index.")))
.subdir("datastore", datastore::router());
route
}