aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes.rs')
-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