From 78eb253ced519f5f6b4c5f7f229aac3747228046 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Mon, 25 Apr 2022 12:57:32 +0300 Subject: Add new endpoint /version Use this endpoint to compare the live version to the version on vcs From here on, the version should be updated regularly as well --- src/routes.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/routes.rs') diff --git a/src/routes.rs b/src/routes.rs index 0df3470..9e08a27 100644 --- a/src/routes.rs +++ b/src/routes.rs @@ -23,6 +23,7 @@ pub fn network(db: Db) -> BoxedFilter<(impl Reply,)> { root.and( transaction_list(db.clone()) .or(get_config_route(db.clone())) + .or(get_version()) .or(register_user(db.clone())) .or(auth_transaction_propose(db.clone())) .or(auth_block_propose(db.clone())) @@ -40,6 +41,13 @@ pub fn get_config_route(db: Db) -> impl Filter impl Filter + Clone { + warp::path!("version") + .and(warp::get()) + .and_then(handlers::get_version) +} + /// GET /user warp route pub fn list_users(db: Db) -> impl Filter + Clone { warp::path!("user") -- cgit v1.2.3-70-g09d2