aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes.rs')
-rw-r--r--src/routes.rs8
1 files changed, 8 insertions, 0 deletions
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,)> {
23 root.and( 23 root.and(
24 transaction_list(db.clone()) 24 transaction_list(db.clone())
25 .or(get_config_route(db.clone())) 25 .or(get_config_route(db.clone()))
26 .or(get_version())
26 .or(register_user(db.clone())) 27 .or(register_user(db.clone()))
27 .or(auth_transaction_propose(db.clone())) 28 .or(auth_transaction_propose(db.clone()))
28 .or(auth_block_propose(db.clone())) 29 .or(auth_block_propose(db.clone()))
@@ -40,6 +41,13 @@ pub fn get_config_route(db: Db) -> impl Filter<Extract = impl Reply, Error = Rej
40 .and_then(handlers::get_config) 41 .and_then(handlers::get_config)
41} 42}
42 43
44/// GET /version warp route
45pub fn get_version() -> impl Filter<Extract = impl Reply, Error = Rejection> + Clone {
46 warp::path!("version")
47 .and(warp::get())
48 .and_then(handlers::get_version)
49}
50
43/// GET /user warp route 51/// GET /user warp route
44pub fn list_users(db: Db) -> impl Filter<Extract = impl Reply, Error = Rejection> + Clone { 52pub fn list_users(db: Db) -> impl Filter<Extract = impl Reply, Error = Rejection> + Clone {
45 warp::path!("user") 53 warp::path!("user")