cleanup api3 structure

This commit is contained in:
Dietmar Maurer
2018-12-08 14:44:55 +01:00
parent 678d72df6b
commit 6ce50400c5
6 changed files with 88 additions and 28 deletions

View File

@ -0,0 +1,21 @@
use failure::*;
use std::collections::HashMap;
use crate::api::schema::*;
use crate::api::router::*;
use serde_json::{json, Value};
fn datastore_list(param: Value, _info: &ApiMethod) -> Result<Value, Error> {
println!("This is a test {}", param);
Ok(json!({}))
}
pub fn router() -> Router {
let route = Router::new()
.get(ApiMethod::new(
datastore_list,
ObjectSchema::new("Directory index.")));
route
}