diff options
author | necrashter | 2022-04-23 16:02:26 +0300 |
---|---|---|
committer | Yigit Sever | 2022-04-23 18:10:12 +0300 |
commit | bc0c945be9a76613ee89ce94e9b979b9ac0bf373 (patch) | |
tree | a5801e1e13d40775c0ac972d304e79a3938836c6 /src/routes.rs | |
parent | 435cda893bd74bd8e597876f4b5f515c8347f9de (diff) | |
download | gradecoin-bc0c945be9a76613ee89ce94e9b979b9ac0bf373.tar.gz gradecoin-bc0c945be9a76613ee89ce94e9b979b9ac0bf373.tar.bz2 gradecoin-bc0c945be9a76613ee89ce94e9b979b9ac0bf373.zip |
Echo network info
Diffstat (limited to 'src/routes.rs')
-rw-r--r-- | src/routes.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/routes.rs b/src/routes.rs index 9afe0ac..9eadbea 100644 --- a/src/routes.rs +++ b/src/routes.rs | |||
@@ -4,10 +4,12 @@ use crate::custom_filters; | |||
4 | use crate::handlers; | 4 | use crate::handlers; |
5 | use crate::Db; | 5 | use crate::Db; |
6 | use warp::{Filter, filters::BoxedFilter, Rejection, Reply}; | 6 | use warp::{Filter, filters::BoxedFilter, Rejection, Reply}; |
7 | use log::{info}; | ||
7 | 8 | ||
8 | /// Every route combined for a single network | 9 | /// Every route combined for a single network |
9 | pub fn network(db: Db) -> BoxedFilter<(impl Reply,)> { | 10 | pub fn network(db: Db) -> BoxedFilter<(impl Reply,)> { |
10 | let url_prefix = db.config.url_prefix.clone(); | 11 | let url_prefix = db.config.url_prefix.clone(); |
12 | info!("{} will be served at endpoint /{}", db.config.name, url_prefix); | ||
11 | let root = if url_prefix.is_empty() { | 13 | let root = if url_prefix.is_empty() { |
12 | // warp::path does not like empty url_prefix | 14 | // warp::path does not like empty url_prefix |
13 | // We need to handle this case separately | 15 | // We need to handle this case separately |