src/api_schema/router.rs: implement list_subdirs() helper

This commit is contained in:
Dietmar Maurer
2019-04-16 12:07:02 +02:00
parent 062d4916ff
commit 13f1cc17ea
9 changed files with 36 additions and 81 deletions

View File

@ -7,12 +7,8 @@ pub mod datastore;
pub fn router() -> Router {
let route = Router::new()
.get(ApiMethod::new(
|| Ok(json!([
{"subdir": "datastore"}
])),
ObjectSchema::new("Directory index.")))
.subdir("datastore", datastore::router());
.subdir("datastore", datastore::router())
.list_subdirs();
route
}