2018-12-08 13:55:54 +00:00
|
|
|
//use failure::*;
|
|
|
|
//use std::collections::HashMap;
|
2018-12-08 13:44:55 +00:00
|
|
|
|
|
|
|
use crate::api::schema::*;
|
|
|
|
use crate::api::router::*;
|
2018-12-08 13:55:54 +00:00
|
|
|
use serde_json::{json};
|
2018-12-08 13:44:55 +00:00
|
|
|
|
2018-12-09 10:59:32 +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"}
|
|
|
|
])),
|
|
|
|
ObjectSchema::new("Directory index.")))
|
|
|
|
.subdir("datastore", datastore::router());
|
|
|
|
|
|
|
|
|
|
|
|
route
|
|
|
|
}
|