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-04-16 08:36:04 +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
|
|
|
|
}
|