mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-25 22:01:19 +00:00
filtering_removed_comments_search
This commit is contained in:
parent
03414c7526
commit
6e9b1de7a2
1 changed files with 6 additions and 0 deletions
|
@ -201,6 +201,12 @@ pub async fn search(
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//filtering out removed comments from search results
|
||||||
|
let comments = comments
|
||||||
|
.into_iter()
|
||||||
|
.filter(|c| !c.comment.removed)
|
||||||
|
.collect();
|
||||||
|
|
||||||
// Return the jwt
|
// Return the jwt
|
||||||
Ok(Json(SearchResponse {
|
Ok(Json(SearchResponse {
|
||||||
type_: search_type,
|
type_: search_type,
|
||||||
|
|
Loading…
Reference in a new issue