Dont show deleted / removed posts when searching. Fixes #4576

This commit is contained in:
Dessalines 2024-04-27 11:36:01 -04:00
parent d3737d4453
commit e055ca9b3b

View file

@ -397,9 +397,11 @@ fn queries<'a>() -> Queries<
if let Some(search_term) = &options.search_term {
let searcher = fuzzy_search(search_term);
query = query.filter(
post::name
(post::name
.ilike(searcher.clone())
.or(post::body.ilike(searcher)),
.or(post::body.ilike(searcher)))
.and(post::removed.eq(false))
.and(post::deleted.eq(false)),
);
}