From 518d5753a71ed968d70bea50c7e669114a2339ee Mon Sep 17 00:00:00 2001 From: spikecodes <19519553+spikecodes@users.noreply.github.com> Date: Sun, 21 Feb 2021 10:13:20 -0800 Subject: [PATCH] Handle about pages --- src/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.rs b/src/main.rs index fe22945..49a4e53 100644 --- a/src/main.rs +++ b/src/main.rs @@ -240,6 +240,9 @@ async fn main() -> tide::Result<()> { // Search all of Reddit app.at("/search/").get(search::find); + // Handle about pages + app.at("/about/").get(|req| error(req, "About pages aren't here yet".to_string())); + app.at("/:id/").get(|req: Request<()>| async { match req.param("id") { // Sort front page