2018-12-08 13:55:54 +00:00
|
|
|
//use failure::*;
|
|
|
|
//use std::collections::HashMap;
|
2018-12-08 13:44:55 +00:00
|
|
|
|
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::*;
|
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(
|
2019-01-26 13:50:37 +00:00
|
|
|
|_,_,_| Ok(json!([
|
2019-01-23 12:05:32 +00:00
|
|
|
{"subdir": "datastore"},
|
2018-12-08 13:44:55 +00:00
|
|
|
])),
|
|
|
|
ObjectSchema::new("Directory index.")))
|
|
|
|
.subdir("datastore", datastore::router());
|
|
|
|
|
|
|
|
|
|
|
|
route
|
|
|
|
}
|