api_schema: allow generic api handler functions

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller
2019-04-16 10:36:04 +02:00
parent 286f0d4099
commit 062d4916ff
13 changed files with 176 additions and 26 deletions

View File

@ -175,7 +175,7 @@ pub fn router() -> Router {
let upid_api = Router::new()
.get(ApiMethod::new(
|_,_,_| {
|| {
let mut result = vec![];
for cmd in &["log", "status"] {
result.push(json!({"subdir": cmd }));