]> git.proxmox.com Git - proxmox-backup.git/blob - src/api2/node/network.rs
improve api_schema module structure
[proxmox-backup.git] / src / api2 / node / network.rs
1 use failure::*;
2
3 //use crate::tools;
4 use crate::api_schema::*;
5 use crate::api_schema::router::*;
6 use serde_json::{json, Value};
7
8
9 fn get_network_config(
10 _param: Value,
11 _info: &ApiMethod,
12 _rpcenv: &mut RpcEnvironment,
13 ) -> Result<Value, Error> {
14
15 Ok(json!({}))
16 }
17
18 pub fn router() -> Router {
19
20 let route = Router::new()
21 .get(ApiMethod::new(
22 get_network_config,
23 ObjectSchema::new("Read network configuration.")));
24
25 route
26 }