Patch broken homepage sorting
This commit is contained in:
parent
3c5b4037e2
commit
467342edf4
@ -3,7 +3,7 @@ name = "libreddit"
|
|||||||
description = " Alternative private front-end to Reddit"
|
description = " Alternative private front-end to Reddit"
|
||||||
license = "AGPL-3.0"
|
license = "AGPL-3.0"
|
||||||
repository = "https://github.com/spikecodes/libreddit"
|
repository = "https://github.com/spikecodes/libreddit"
|
||||||
version = "0.5.0"
|
version = "0.5.1"
|
||||||
authors = ["spikecodes <19519553+spikecodes@users.noreply.github.com>"]
|
authors = ["spikecodes <19519553+spikecodes@users.noreply.github.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
|
@ -217,9 +217,9 @@ async fn main() {
|
|||||||
|
|
||||||
app.at("/:id").get(|req: Request<Body>| {
|
app.at("/:id").get(|req: Request<Body>| {
|
||||||
async {
|
async {
|
||||||
match req.param("id") {
|
match req.param("id").as_deref() {
|
||||||
// Sort front page
|
// 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
|
// Short link for post
|
||||||
Some(id) if id.len() > 4 && id.len() < 7 => post::item(req).await,
|
Some(id) if id.len() > 4 && id.len() < 7 => post::item(req).await,
|
||||||
// Error message for unknown pages
|
// Error message for unknown pages
|
||||||
|
Loading…
Reference in New Issue
Block a user