Patch broken homepage sorting

This commit is contained in:
spikecodes 2021-03-18 08:51:31 -07:00
parent 3c5b4037e2
commit 467342edf4
No known key found for this signature in database
GPG Key ID: 004CECFF9B463BCB
2 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ name = "libreddit"
description = " Alternative private front-end to Reddit"
license = "AGPL-3.0"
repository = "https://github.com/spikecodes/libreddit"
version = "0.5.0"
version = "0.5.1"
authors = ["spikecodes <19519553+spikecodes@users.noreply.github.com>"]
edition = "2018"

View File

@ -217,9 +217,9 @@ async fn main() {
app.at("/:id").get(|req: Request<Body>| {
async {
match req.param("id") {
match req.param("id").as_deref() {
// Sort front page
// Some("best") | Some("hot") | Some("new") | Some("top") | Some("rising") | Some("controversial") => subreddit::community(req).await,
Some("best") | Some("hot") | Some("new") | Some("top") | Some("rising") | Some("controversial") => subreddit::community(req).await,
// Short link for post
Some(id) if id.len() > 4 && id.len() < 7 => post::item(req).await,
// Error message for unknown pages