diff options
Diffstat (limited to 'src/macros.rs')
| -rw-r--r-- | src/macros.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/macros.rs b/src/macros.rs index 997f7d5..fe1f20b 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -18,8 +18,9 @@ #[macro_export] macro_rules! mount_page { - ($router:ident, $at:literal, $file:literal) => { - (*crate::ROUTES.lock().unwrap()).push($at.to_string()); + ($router:ident, $at:literal, $description:literal, $file:literal) => { + (*crate::ROUTES.lock().unwrap()) + .insert($at.to_string(), $description.to_string()); ($router).mount( $at, @@ -46,8 +47,9 @@ 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:ident, $at:literal, $description:literal, $file:literal) => { + (*crate::ROUTES.lock().unwrap()) + .insert($at.to_string(), $description.to_string()); ($router).mount( $at, |