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

@ -26,9 +26,11 @@ fn get_version(
}))
}
pub fn router() -> Router {
Router::new()
.get(ApiMethod::new(
get_version,
ObjectSchema::new("Proxmox Backup Server API version.")))
}
pub const ROUTER: Router = Router::new()
.get(
&ApiMethod::new(
&ApiHandler::Sync(&get_version),
&ObjectSchema::new("Proxmox Backup Server API version.", &[])
)
);