aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authornecrashter2022-04-23 16:02:26 +0300
committerYigit Sever2022-04-23 18:10:12 +0300
commitbc0c945be9a76613ee89ce94e9b979b9ac0bf373 (patch)
treea5801e1e13d40775c0ac972d304e79a3938836c6 /src
parent435cda893bd74bd8e597876f4b5f515c8347f9de (diff)
downloadgradecoin-bc0c945be9a76613ee89ce94e9b979b9ac0bf373.tar.gz
gradecoin-bc0c945be9a76613ee89ce94e9b979b9ac0bf373.tar.bz2
gradecoin-bc0c945be9a76613ee89ce94e9b979b9ac0bf373.zip
Echo network info
Diffstat (limited to 'src')
-rw-r--r--src/routes.rs2
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;
4use crate::handlers; 4use crate::handlers;
5use crate::Db; 5use crate::Db;
6use warp::{Filter, filters::BoxedFilter, Rejection, Reply}; 6use warp::{Filter, filters::BoxedFilter, Rejection, Reply};
7use log::{info};
7 8
8/// Every route combined for a single network 9/// Every route combined for a single network
9pub fn network(db: Db) -> BoxedFilter<(impl Reply,)> { 10pub 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