mirror of https://github.com/spikecodes/libreddit
Redirect to subreddit from search
This commit is contained in:
parent
d84cb41df0
commit
91a9b173a1
|
@ -54,6 +54,10 @@ pub async fn find(req: Request<Body>) -> Result<Response<Body>, String> {
|
|||
return Ok(redirect("/".to_string()));
|
||||
}
|
||||
|
||||
if query.starts_with("r/") {
|
||||
return Ok(redirect(format!("/{}", query)));
|
||||
}
|
||||
|
||||
let sub = req.param("sub").unwrap_or_default();
|
||||
let quarantined = can_access_quarantine(&req, &sub);
|
||||
// Handle random subreddits
|
||||
|
|
Loading…
Reference in New Issue