move admin API to /admin/ subfolder

This commit is contained in:
Dietmar Maurer
2019-01-04 10:32:27 +01:00
parent b663789bdb
commit 030cc2a903
3 changed files with 21 additions and 3 deletions

18
src/api3/admin.rs Normal file
View File

@ -0,0 +1,18 @@
use crate::api::schema::*;
use crate::api::router::*;
use serde_json::{json};
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());
route
}