2019-01-23 12:05:32 +00:00
|
|
|
use failure::*;
|
|
|
|
|
2019-01-30 17:25:37 +00:00
|
|
|
//use crate::tools;
|
2019-02-17 09:16:33 +00:00
|
|
|
use crate::api_schema::*;
|
2019-02-17 08:59:20 +00:00
|
|
|
use crate::api_schema::router::*;
|
2019-01-23 12:05:32 +00:00
|
|
|
use serde_json::{json, Value};
|
|
|
|
|
2019-05-09 05:44:09 +00:00
|
|
|
use crate::api2::types::*;
|
2019-01-23 12:05:32 +00:00
|
|
|
|
2019-01-26 13:50:37 +00:00
|
|
|
fn get_network_config(
|
|
|
|
_param: Value,
|
|
|
|
_info: &ApiMethod,
|
2019-06-07 11:10:56 +00:00
|
|
|
_rpcenv: &mut dyn RpcEnvironment,
|
2019-01-26 13:50:37 +00:00
|
|
|
) -> Result<Value, Error> {
|
2019-01-23 12:05:32 +00:00
|
|
|
|
|
|
|
Ok(json!({}))
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn router() -> Router {
|
|
|
|
|
|
|
|
let route = Router::new()
|
|
|
|
.get(ApiMethod::new(
|
|
|
|
get_network_config,
|
2019-04-09 12:43:30 +00:00
|
|
|
ObjectSchema::new("Read network configuration.")
|
2019-05-09 05:44:09 +00:00
|
|
|
.required("node", NODE_SCHEMA.clone())
|
2019-04-09 12:43:30 +00:00
|
|
|
));
|
2019-01-23 12:05:32 +00:00
|
|
|
|
|
|
|
route
|
|
|
|
}
|