Rewrite Reddit post links to Libreddit equivalents

This commit is contained in:
spikecodes 2021-12-26 21:18:20 -08:00
parent 150ebe38f3
commit 7aeabfc4bc
No known key found for this signature in database
GPG key ID: 004CECFF9B463BCB
10 changed files with 112 additions and 175 deletions

View file

@ -78,7 +78,7 @@ pub async fn find(req: Request<Body>) -> Result<Response<Body>, String> {
let url = String::from(req.uri().path_and_query().map_or("", |val| val.as_str()));
// If all requested subs are filtered, we don't need to fetch posts.
if sub.split("+").all(|s| filters.contains(s)) {
if sub.split('+').all(|s| filters.contains(s)) {
template(SearchTemplate {
posts: Vec::new(),
subreddits,