Handle about pages

This commit is contained in:
spikecodes 2021-02-21 10:13:20 -08:00
parent de38f7ef18
commit 518d5753a7
No known key found for this signature in database
GPG Key ID: 004CECFF9B463BCB

View File

@ -240,6 +240,9 @@ async fn main() -> tide::Result<()> {
// Search all of Reddit // Search all of Reddit
app.at("/search/").get(search::find); 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 { app.at("/:id/").get(|req: Request<()>| async {
match req.param("id") { match req.param("id") {
// Sort front page // Sort front page