mirror of
https://github.com/redlib-org/redlib.git
synced 2025-06-24 18:10:58 +00:00
Upgrade to v0.14
This commit is contained in:
parent
8bb247af3b
commit
43ed9756dc
5 changed files with 12 additions and 11 deletions
|
@ -50,11 +50,11 @@ pub async fn find(req: Request<Body>) -> Result<Response<Body>, String> {
|
|||
}
|
||||
let query = param(&path, "q").unwrap_or_default();
|
||||
|
||||
let sort = param(&path, "sort").unwrap_or("relevance".to_string());
|
||||
let sort = param(&path, "sort").unwrap_or_else(|| "relevance".to_string());
|
||||
|
||||
let subreddits = match param(&path, "restrict_sr") {
|
||||
None => search_subreddits(&query).await,
|
||||
Some(_) => Vec::new()
|
||||
Some(_) => Vec::new(),
|
||||
};
|
||||
|
||||
let url = String::from(req.uri().path_and_query().map_or("", |val| val.as_str()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue