proxmox-backup/src/api2/node.rs

31 lines
757 B
Rust
Raw Normal View History

2019-02-17 08:59:20 +00:00
use crate::api_schema::schema::*;
use crate::api_schema::router::*;
use serde_json::{json};
mod time;
mod network;
mod dns;
mod syslog;
mod services;
pub fn router() -> Router {
let route = Router::new()
.get(ApiMethod::new(
|_,_,_| Ok(json!([
{"subdir": "dns"},
{"subdir": "network"},
{"subdir": "services"},
{"subdir": "syslog"},
{"subdir": "time"},
])),
ObjectSchema::new("Directory index.")))
.subdir("dns", dns::router())
.subdir("network", network::router())
.subdir("services", services::router())
.subdir("syslog", syslog::router())
.subdir("time", time::router());
route
}