Support /comments endpoint (closes #568)

Code based on @Daniel-Valentine's [implementation](e2c84879d6)
This commit is contained in:
Spike 2022-11-01 20:53:42 -07:00 committed by GitHub
parent 1b5e9a4279
commit 170ea384fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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").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").get(|r| post::item(r).boxed());
app.at("/r/:sub/comments/:id/:title/:comment_id").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()); app.at("/r/:sub/search").get(|r| search::find(r).boxed());