mirror of
https://github.com/redlib-org/redlib.git
synced 2024-12-06 19:27:17 +01:00
Support /comments endpoint (closes #568)
Code based on @Daniel-Valentine's [implementation](https://github.com/ferritreader/libreddit-fork/commit/e2c84879d658f28d80c318b3bcc24f12e14c807a)
This commit is contained in:
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user