diff options
author | necrashter | 2022-04-23 15:17:34 +0300 |
---|---|---|
committer | Yigit Sever | 2022-04-23 18:10:12 +0300 |
commit | 2541f5f849e25d7a5483c5715ef2e84945016637 (patch) | |
tree | 7271664c9e9c65fb65a1feed976cc44c80fd9b43 /src | |
parent | 3f5671a3b0833046cad4f4be25d66ec49707a0b6 (diff) | |
download | gradecoin-2541f5f849e25d7a5483c5715ef2e84945016637.tar.gz gradecoin-2541f5f849e25d7a5483c5715ef2e84945016637.tar.bz2 gradecoin-2541f5f849e25d7a5483c5715ef2e84945016637.zip |
Handle url_prefix in network
Diffstat (limited to 'src')
-rw-r--r-- | src/routes.rs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/routes.rs b/src/routes.rs index f53a20c..60e4ffa 100644 --- a/src/routes.rs +++ b/src/routes.rs | |||
@@ -7,12 +7,16 @@ use warp::{Filter, filters::BoxedFilter, Rejection, Reply}; | |||
7 | 7 | ||
8 | /// Every route combined for a single network | 8 | /// Every route combined for a single network |
9 | pub fn network(db: Db) -> BoxedFilter<(impl Reply,)> { | 9 | pub fn network(db: Db) -> BoxedFilter<(impl Reply,)> { |
10 | transaction_list(db.clone()) | 10 | let url_prefix = db.config.url_prefix.clone(); |
11 | .or(register_user(db.clone())) | 11 | warp::path(url_prefix) |
12 | .or(auth_transaction_propose(db.clone())) | 12 | .and( |
13 | .or(auth_block_propose(db.clone())) | 13 | transaction_list(db.clone()) |
14 | .or(list_users(db.clone())) | 14 | .or(register_user(db.clone())) |
15 | .or(block_list(db)) | 15 | .or(auth_transaction_propose(db.clone())) |
16 | .or(auth_block_propose(db.clone())) | ||
17 | .or(list_users(db.clone())) | ||
18 | .or(block_list(db)) | ||
19 | ) | ||
16 | .boxed() | 20 | .boxed() |
17 | } | 21 | } |
18 | 22 | ||