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 {
|
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.
|
||||||
|
|
Loading…
Reference in a new issue