proxmox-backup/src/api2/config.rs

23 lines
462 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
2019-02-17 08:59:20 +00:00
use crate::api_schema::schema::*;
use crate::api_schema::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"},
2018-12-08 13:44:55 +00:00
])),
ObjectSchema::new("Directory index.")))
.subdir("datastore", datastore::router());
route
}