Patch broken homepage sorting

pull/171/head v0.5.1
spikecodes 2 years ago
parent 3c5b4037e2
commit 467342edf4
No known key found for this signature in database
GPG Key ID: 004CECFF9B463BCB
  1. 2
      Cargo.toml
  2. 4
      src/main.rs

@ -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"

@ -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

Loading…
Cancel
Save