aboutsummaryrefslogtreecommitdiff
path: root/src/route.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-05-17 02:15:08 -0700
committerFuwn <[email protected]>2023-05-17 02:15:08 -0700
commitfe1ec97079a13f934dbec53ea443e52ba81d2566 (patch)
tree92d8fc25589eebee76ba677bc72b8145381493b4 /src/route.rs
parentdeps(windmark): bump to 0.3.9 (diff)
downloadlocus-fe1ec97079a13f934dbec53ea443e52ba81d2566.tar.xz
locus-fe1ec97079a13f934dbec53ea443e52ba81d2566.zip
fix(route): fill for root path
Diffstat (limited to 'src/route.rs')
-rw-r--r--src/route.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/route.rs b/src/route.rs
index 7237fec..a983374 100644
--- a/src/route.rs
+++ b/src/route.rs
@@ -91,6 +91,14 @@ pub fn cache(context: &RouteContext, response: &str) {
);
}
- trace!("recache for {}", context.url.path());
+ trace!("recache for {}", {
+ let path = context.url.path();
+
+ if path.is_empty() {
+ "/"
+ } else {
+ path
+ }
+ });
}
}