mirror of
https://github.com/redlib-org/redlib.git
synced 2025-06-07 15:17:47 +00:00
Fix search pages
This commit is contained in:
parent
5d26b5c764
commit
a3384cbaa6
3 changed files with 33 additions and 18 deletions
|
@ -97,7 +97,7 @@ pub struct ErrorTemplate {
|
|||
|
||||
// Grab a query param from a url
|
||||
pub fn param(path: &str, value: &str) -> String {
|
||||
let url = Url::parse(format!("https://reddit.com/{}", path).as_str()).unwrap();
|
||||
let url = Url::parse(format!("https://libredd.it/{}", path).as_str()).unwrap();
|
||||
let pairs: std::collections::HashMap<_, _> = url.query_pairs().into_owned().collect();
|
||||
pairs.get(value).unwrap_or(&String::new()).to_owned()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue