Fix #195
This commit is contained in:
parent
46e22cf74e
commit
3cf787cf98
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -605,7 +605,7 @@ checksum = "9385f66bf6105b241aa65a61cb923ef20efc665cb9f9bb50ac2f0c4b7f378d41"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libreddit"
|
name = "libreddit"
|
||||||
version = "0.10.2"
|
version = "0.10.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"askama",
|
"askama",
|
||||||
"async-recursion",
|
"async-recursion",
|
||||||
|
@ -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.10.2"
|
version = "0.10.3"
|
||||||
authors = ["spikecodes <19519553+spikecodes@users.noreply.github.com>"]
|
authors = ["spikecodes <19519553+spikecodes@users.noreply.github.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
|
@ -205,10 +205,10 @@ async fn main() {
|
|||||||
.at("/r/:sub/w")
|
.at("/r/:sub/w")
|
||||||
.get(|r| async move { Ok(redirect(format!("/r/{}/wiki", r.param("sub").unwrap_or_default()))) }.boxed());
|
.get(|r| async move { Ok(redirect(format!("/r/{}/wiki", r.param("sub").unwrap_or_default()))) }.boxed());
|
||||||
app
|
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());
|
.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").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());
|
app.at("/r/:sub/about/sidebar").get(|r| subreddit::sidebar(r).boxed());
|
||||||
|
|
||||||
@ -223,10 +223,10 @@ async fn main() {
|
|||||||
// View Reddit wiki
|
// View Reddit wiki
|
||||||
app.at("/w").get(|_| async { Ok(redirect("/wiki".to_string())) }.boxed());
|
app.at("/w").get(|_| async { Ok(redirect("/wiki".to_string())) }.boxed());
|
||||||
app
|
app
|
||||||
.at("/w/:page")
|
.at("/w/*page")
|
||||||
.get(|r| async move { Ok(redirect(format!("/wiki/{}", r.param("page").unwrap_or_default()))) }.boxed());
|
.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").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
|
// Search all of Reddit
|
||||||
app.at("/search").get(|r| search::find(r).boxed());
|
app.at("/search").get(|r| search::find(r).boxed());
|
||||||
|
Loading…
Reference in New Issue
Block a user