add support for /comments/:id endpoint (and derivatives) (spikecodes#568)

This commit is contained in:
Daniel Valentine 2022-09-21 20:24:21 -06:00 committed by GitHub
commit e2c84879d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

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/: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());