use const api definitions

This commit is contained in:
Dietmar Maurer
2019-11-21 09:36:41 +01:00
parent e4a5ab8ddb
commit 255f378a1b
40 changed files with 2368 additions and 1974 deletions

View File

@ -1,13 +1,11 @@
//use failure::*;
//use std::collections::HashMap;
//use crate::api_schema;
use crate::api_schema::router::*;
pub mod datastore;
pub fn router() -> Router {
Router::new()
.subdir("datastore", datastore::router())
.list_subdirs()
}
const SUBDIRS: SubdirMap = &[
("datastore", &datastore::ROUTER)
];
pub const ROUTER: Router = Router::new()
.get(&list_subdirs_api_method!(SUBDIRS))
.subdirs(SUBDIRS);