mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-27 06:41:18 +00:00
Address PR comments.
This commit is contained in:
parent
e055ca9b3b
commit
7c2c27f442
1 changed files with 7 additions and 7 deletions
|
@ -396,13 +396,13 @@ fn queries<'a>() -> Queries<
|
|||
|
||||
if let Some(search_term) = &options.search_term {
|
||||
let searcher = fuzzy_search(search_term);
|
||||
query = query.filter(
|
||||
(post::name
|
||||
.ilike(searcher.clone())
|
||||
.or(post::body.ilike(searcher)))
|
||||
.and(post::removed.eq(false))
|
||||
.and(post::deleted.eq(false)),
|
||||
);
|
||||
query = query
|
||||
.filter(
|
||||
post::name
|
||||
.ilike(searcher.clone())
|
||||
.or(post::body.ilike(searcher)),
|
||||
)
|
||||
.filter(not(post::removed.or(post::deleted)));
|
||||
}
|
||||
|
||||
// If there is a content warning, show nsfw content by default.
|
||||
|
|
Loading…
Reference in a new issue