From 977d5cfce07c90790fed4214d6e47206c5ae1429 Mon Sep 17 00:00:00 2001 From: Daniel Valentine Date: Wed, 21 Sep 2022 20:21:24 -0600 Subject: [PATCH] add support for /comments/:id endpoint (and derivatives) (spikecodes#568) --- src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.rs b/src/main.rs index 78d0c62..c41d13d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -238,6 +238,11 @@ async fn main() { app.at("/r/:sub/comments/:id").get(|r| post::item(r).boxed()); app.at("/r/:sub/comments/:id/:title").get(|r| post::item(r).boxed()); app.at("/r/:sub/comments/:id/:title/:comment_id").get(|r| post::item(r).boxed()); + app.at("/comments/:id").get(|r| post::item(r).boxed()); + app.at("/comments/:id/comments").get(|r| post::item(r).boxed()); + app.at("/comments/:id/comments/:comment_id").get(|r| post::item(r).boxed()); + app.at("/comments/:id/:title").get(|r| post::item(r).boxed()); + app.at("/comments/:id/:title/:comment_id").get(|r| post::item(r).boxed()); app.at("/r/:sub/search").get(|r| search::find(r).boxed());