Address PR comments.

This commit is contained in:
Dessalines 2024-04-29 12:27:03 -04:00
parent e055ca9b3b
commit 7c2c27f442

View file

@ -396,13 +396,13 @@ fn queries<'a>() -> Queries<
if let Some(search_term) = &options.search_term { if let Some(search_term) = &options.search_term {
let searcher = fuzzy_search(search_term); let searcher = fuzzy_search(search_term);
query = query.filter( query = query
(post::name .filter(
.ilike(searcher.clone()) post::name
.or(post::body.ilike(searcher))) .ilike(searcher.clone())
.and(post::removed.eq(false)) .or(post::body.ilike(searcher)),
.and(post::deleted.eq(false)), )
); .filter(not(post::removed.or(post::deleted)));
} }
// If there is a content warning, show nsfw content by default. // If there is a content warning, show nsfw content by default.