mirror of
https://github.com/redlib-org/redlib.git
synced 2025-05-16 06:53:02 +00:00
Update crates and optimize parameters
This commit is contained in:
parent
0f7ba3c61d
commit
34ea679519
6 changed files with 27 additions and 27 deletions
|
@ -64,7 +64,7 @@ pub async fn item(req: Request<Body>) -> Result<Response<Body>, String> {
|
|||
sort,
|
||||
prefs: Preferences::new(req),
|
||||
single_thread,
|
||||
url: url,
|
||||
url,
|
||||
})
|
||||
}
|
||||
// If the Reddit API returns an error, exit and send error page to user
|
||||
|
|
|
@ -39,7 +39,7 @@ pub async fn get(req: Request<Body>) -> Result<Response<Body>, String> {
|
|||
let url = req.uri().to_string();
|
||||
template(SettingsTemplate {
|
||||
prefs: Preferences::new(req),
|
||||
url: url,
|
||||
url,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -248,7 +248,7 @@ pub async fn wiki(req: Request<Body>) -> Result<Response<Body>, String> {
|
|||
wiki: rewrite_urls(response["data"]["content_html"].as_str().unwrap_or("<h3>Wiki not found</h3>")),
|
||||
page,
|
||||
prefs: Preferences::new(req),
|
||||
url: url,
|
||||
url,
|
||||
}),
|
||||
Err(msg) => {
|
||||
if msg == "quarantined" {
|
||||
|
@ -286,7 +286,7 @@ pub async fn sidebar(req: Request<Body>) -> Result<Response<Body>, String> {
|
|||
sub,
|
||||
page: "Sidebar".to_string(),
|
||||
prefs: Preferences::new(req),
|
||||
url: url,
|
||||
url,
|
||||
}),
|
||||
Err(msg) => {
|
||||
if msg == "quarantined" {
|
||||
|
|
|
@ -611,7 +611,7 @@ pub async fn error(req: Request<Body>, msg: String) -> Result<Response<Body>, St
|
|||
let body = ErrorTemplate {
|
||||
msg,
|
||||
prefs: Preferences::new(req),
|
||||
url: url,
|
||||
url,
|
||||
}
|
||||
.render()
|
||||
.unwrap_or_default();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue