From 627eadf4871dbba2a506bd9a1327b89f161405b6 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 5 Sep 2024 06:53:51 -0700 Subject: feat(sitemap): rename to directory --- src/modules/directory.rs | 21 +++++++++++++++++++++ src/modules/sitemap.rs | 21 --------------------- 2 files changed, 21 insertions(+), 21 deletions(-) create mode 100644 src/modules/directory.rs delete mode 100644 src/modules/sitemap.rs (limited to 'src/modules') diff --git a/src/modules/directory.rs b/src/modules/directory.rs new file mode 100644 index 0000000..9eddc31 --- /dev/null +++ b/src/modules/directory.rs @@ -0,0 +1,21 @@ +pub fn module(router: &mut windmark::router::Router) { + crate::route::track_mount( + router, + "/directory", + "A map of all publicly available routes on this Gemini capsule", + |context| { + crate::response::success( + &format!( + "# Directory\n\nA map of all publicly available routes on this \ + Gemini capsule\n\n{}", + (*crate::route::ROUTES.lock().unwrap()) + .iter() + .map(|(r, d)| format!("=> {} {}", r, d.description)) + .collect::>() + .join("\n") + ), + &context, + ) + }, + ); +} diff --git a/src/modules/sitemap.rs b/src/modules/sitemap.rs deleted file mode 100644 index 0f88ef4..0000000 --- a/src/modules/sitemap.rs +++ /dev/null @@ -1,21 +0,0 @@ -pub fn module(router: &mut windmark::router::Router) { - crate::route::track_mount( - router, - "/sitemap", - "A map of all publicly available routes on this Gemini capsule", - |context| { - crate::response::success( - &format!( - "# Sitemap\n\nA map of all publicly available routes on this Gemini \ - capsule\n\n{}", - (*crate::route::ROUTES.lock().unwrap()) - .iter() - .map(|(r, d)| format!("=> {} {}", r, d.description)) - .collect::>() - .join("\n") - ), - &context, - ) - }, - ); -} -- cgit v1.2.3