Support post links without titles

This commit is contained in:
spikecodes 2021-02-09 10:11:39 -08:00
parent 008924fff8
commit e731cfbac4
No known key found for this signature in database
GPG key ID: 004CECFF9B463BCB
2 changed files with 3 additions and 1 deletions

View file

@ -160,6 +160,7 @@ async fn main() -> tide::Result<()> {
app.at("/u/:name/comments/:id/:title/:comment/").get(post::item);
app.at("/user/:name/").get(user::profile);
app.at("/user/:name/comments/:id/").get(post::item);
app.at("/user/:name/comments/:id/:title/").get(post::item);
app.at("/user/:name/comments/:id/:title/:comment/").get(post::item);
@ -173,6 +174,7 @@ async fn main() -> tide::Result<()> {
app.at("/r/:sub/subscribe/").post(subreddit::subscriptions);
app.at("/r/:sub/unsubscribe/").post(subreddit::subscriptions);
// View post on subreddit
app.at("/r/:sub/comments/:id/").get(post::item);
app.at("/r/:sub/comments/:id/:title/").get(post::item);
app.at("/r/:sub/comments/:id/:title/:comment_id/").get(post::item);
// Search inside subreddit