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

@ -69,11 +69,6 @@ fn create_ticket(
pub fn router() -> Router {
let route = Router::new()
.get(ApiMethod::new(
|| Ok(json!([
{"subdir": "ticket"}
])),
ObjectSchema::new("Directory index.")))
.subdir(
"ticket",
Router::new()
@ -97,7 +92,8 @@ pub fn router() -> Router {
.required("CSRFPreventionToken", StringSchema::new("Cross Site Request Forgery Prevention Token."))
).protected(true)
)
);
)
.list_subdirs();
route
}