This commit is contained in:
spikecodes 2021-04-14 21:53:17 -07:00
parent 46e22cf74e
commit 3cf787cf98
No known key found for this signature in database
GPG Key ID: 004CECFF9B463BCB
3 changed files with 6 additions and 6 deletions

2
Cargo.lock generated
View File

@ -605,7 +605,7 @@ checksum = "9385f66bf6105b241aa65a61cb923ef20efc665cb9f9bb50ac2f0c4b7f378d41"
[[package]]
name = "libreddit"
version = "0.10.2"
version = "0.10.3"
dependencies = [
"askama",
"async-recursion",

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.10.2"
version = "0.10.3"
authors = ["spikecodes <19519553+spikecodes@users.noreply.github.com>"]
edition = "2018"

View File

@ -205,10 +205,10 @@ async fn main() {
.at("/r/:sub/w")
.get(|r| async move { Ok(redirect(format!("/r/{}/wiki", r.param("sub").unwrap_or_default()))) }.boxed());
app
.at("/r/:sub/w/:page")
.at("/r/:sub/w/*page")
.get(|r| async move { Ok(redirect(format!("/r/{}/wiki/{}", r.param("sub").unwrap_or_default(), r.param("wiki").unwrap_or_default()))) }.boxed());
app.at("/r/:sub/wiki").get(|r| subreddit::wiki(r).boxed());
app.at("/r/:sub/wiki/:page").get(|r| subreddit::wiki(r).boxed());
app.at("/r/:sub/wiki/*page").get(|r| subreddit::wiki(r).boxed());
app.at("/r/:sub/about/sidebar").get(|r| subreddit::sidebar(r).boxed());
@ -223,10 +223,10 @@ async fn main() {
// View Reddit wiki
app.at("/w").get(|_| async { Ok(redirect("/wiki".to_string())) }.boxed());
app
.at("/w/:page")
.at("/w/*page")
.get(|r| async move { Ok(redirect(format!("/wiki/{}", r.param("page").unwrap_or_default()))) }.boxed());
app.at("/wiki").get(|r| subreddit::wiki(r).boxed());
app.at("/wiki/:page").get(|r| subreddit::wiki(r).boxed());
app.at("/wiki/*page").get(|r| subreddit::wiki(r).boxed());
// Search all of Reddit
app.at("/search").get(|r| search::find(r).boxed());