blob: 0f88ef4b4ef24729a04a7e31bfeb4de5b6f97a80 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
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::<Vec<_>>()
.join("\n")
),
&context,
)
},
);
}
|