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

@ -21,9 +21,10 @@ fn get_subscription(
}))
}
pub fn router() -> Router {
Router::new()
.get(ApiMethod::new(
get_subscription,
ObjectSchema::new("Read subscription info.")))
}
pub const ROUTER: Router = Router::new()
.get(
&ApiMethod::new(
&ApiHandler::Sync(&get_subscription),
&ObjectSchema::new("Read subscription info.", &[])
)
);