diff options
Diffstat (limited to 'src/routes.rs')
-rw-r--r-- | src/routes.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/routes.rs b/src/routes.rs index 9eadbea..651626a 100644 --- a/src/routes.rs +++ b/src/routes.rs | |||
@@ -19,6 +19,7 @@ pub fn network(db: Db) -> BoxedFilter<(impl Reply,)> { | |||
19 | }; | 19 | }; |
20 | root.and( | 20 | root.and( |
21 | transaction_list(db.clone()) | 21 | transaction_list(db.clone()) |
22 | .or(get_config_route(db.clone())) | ||
22 | .or(register_user(db.clone())) | 23 | .or(register_user(db.clone())) |
23 | .or(auth_transaction_propose(db.clone())) | 24 | .or(auth_transaction_propose(db.clone())) |
24 | .or(auth_block_propose(db.clone())) | 25 | .or(auth_block_propose(db.clone())) |
@@ -28,6 +29,14 @@ pub fn network(db: Db) -> BoxedFilter<(impl Reply,)> { | |||
28 | .boxed() | 29 | .boxed() |
29 | } | 30 | } |
30 | 31 | ||
32 | /// GET /config warp route | ||
33 | pub fn get_config_route(db: Db) -> impl Filter<Extract = impl Reply, Error = Rejection> + Clone { | ||
34 | warp::path!("config") | ||
35 | .and(warp::get()) | ||
36 | .and(custom_filters::with_db(db)) | ||
37 | .and_then(handlers::get_config) | ||
38 | } | ||
39 | |||
31 | /// GET /user warp route | 40 | /// GET /user warp route |
32 | pub fn list_users(db: Db) -> impl Filter<Extract = impl Reply, Error = Rejection> + Clone { | 41 | pub fn list_users(db: Db) -> impl Filter<Extract = impl Reply, Error = Rejection> + Clone { |
33 | warp::path!("user") | 42 | warp::path!("user") |