aboutsummaryrefslogtreecommitdiff
path: root/src/macros.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-04-14 18:29:03 -0700
committerFuwn <[email protected]>2022-04-14 18:29:03 -0700
commit97b08663354d5f2c494151bcd97d40475ee8d3b7 (patch)
treeec53d4348bbfa03c4faa9e83fcf2378e8947b9a3 /src/macros.rs
parentfeat: route fixing (diff)
downloadlocus-97b08663354d5f2c494151bcd97d40475ee8d3b7.tar.xz
locus-97b08663354d5f2c494151bcd97d40475ee8d3b7.zip
feat: sitemap
Diffstat (limited to 'src/macros.rs')
-rw-r--r--src/macros.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/macros.rs b/src/macros.rs
index 4882475..997f7d5 100644
--- a/src/macros.rs
+++ b/src/macros.rs
@@ -19,6 +19,8 @@
#[macro_export]
macro_rules! mount_page {
($router:ident, $at:literal, $file:literal) => {
+ (*crate::ROUTES.lock().unwrap()).push($at.to_string());
+
($router).mount(
$at,
Box::new(|context| {
@@ -45,6 +47,8 @@ macro_rules! mount_page {
#[macro_export]
macro_rules! mount_file {
($router:ident, $at:literal, $file:literal) => {
+ (*crate::ROUTES.lock().unwrap()).push($at.to_string());
+
($router).mount(
$at,
Box::new(|_| {