diff options
author | Yigit Sever | 2021-04-15 00:32:28 +0300 |
---|---|---|
committer | Yigit Sever | 2021-04-15 00:32:28 +0300 |
commit | 7f91412ddf3895214a8b56ac520ea7a60c0d24a1 (patch) | |
tree | db6d48f42f51d76de97c64c38bf5bf1f319055cf /src/routes.rs | |
parent | 8be38f7f9d52bf95d20fbe440cb9270b035b2cd1 (diff) | |
download | gradecoin-7f91412ddf3895214a8b56ac520ea7a60c0d24a1.tar.gz gradecoin-7f91412ddf3895214a8b56ac520ea7a60c0d24a1.tar.bz2 gradecoin-7f91412ddf3895214a8b56ac520ea7a60c0d24a1.zip |
[WIP] Add template support
Diffstat (limited to 'src/routes.rs')
-rw-r--r-- | src/routes.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/routes.rs b/src/routes.rs index 280de35..f8d9605 100644 --- a/src/routes.rs +++ b/src/routes.rs | |||
@@ -7,7 +7,10 @@ use crate::schema::Db; | |||
7 | 7 | ||
8 | /// Every route combined | 8 | /// Every route combined |
9 | pub fn consensus_routes(db: Db) -> impl Filter<Extract = impl Reply, Error = Rejection> + Clone { | 9 | pub fn consensus_routes(db: Db) -> impl Filter<Extract = impl Reply, Error = Rejection> + Clone { |
10 | transaction_list(db.clone()) | 10 | let welcome_route = warp::path::end().and_then(handlers::welcome_handler); |
11 | |||
12 | welcome_route | ||
13 | .or(transaction_list(db.clone())) | ||
11 | .or(register_user(db.clone())) | 14 | .or(register_user(db.clone())) |
12 | .or(auth_transaction_propose(db.clone())) | 15 | .or(auth_transaction_propose(db.clone())) |
13 | .or(auth_block_propose(db.clone())) | 16 | .or(auth_block_propose(db.clone())) |
@@ -60,4 +63,3 @@ pub fn auth_block_propose(db: Db) -> impl Filter<Extract = impl Reply, Error = R | |||
60 | .and(custom_filters::with_db(db)) | 63 | .and(custom_filters::with_db(db)) |
61 | .and_then(handlers::authorized_propose_block) | 64 | .and_then(handlers::authorized_propose_block) |
62 | } | 65 | } |
63 | |||