mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-10-01 01:36:12 -04:00
parent
7a04971ecd
commit
f0e487f18a
@ -670,7 +670,6 @@ pub async fn remove_user_data_in_community(
|
|||||||
.pool(pool)
|
.pool(pool)
|
||||||
.creator_id(Some(banned_person_id))
|
.creator_id(Some(banned_person_id))
|
||||||
.community_id(Some(community_id))
|
.community_id(Some(community_id))
|
||||||
.limit(Some(i64::MAX))
|
|
||||||
.build()
|
.build()
|
||||||
.list()
|
.list()
|
||||||
.await?;
|
.await?;
|
||||||
|
@ -36,7 +36,7 @@ use lemmy_db_schema::{
|
|||||||
post::Post,
|
post::Post,
|
||||||
},
|
},
|
||||||
traits::JoinView,
|
traits::JoinView,
|
||||||
utils::{fuzzy_search, get_conn, limit_and_offset_unlimited, DbPool},
|
utils::{fuzzy_search, get_conn, limit_and_offset, DbPool},
|
||||||
CommentSortType,
|
CommentSortType,
|
||||||
ListingType,
|
ListingType,
|
||||||
};
|
};
|
||||||
@ -340,9 +340,12 @@ impl<'a> CommentQuery<'a> {
|
|||||||
// This does not work for comment trees, and the limit should be manually set to a high number
|
// This does not work for comment trees, and the limit should be manually set to a high number
|
||||||
//
|
//
|
||||||
// If a max depth is given, then you know its a tree fetch, and limits should be ignored
|
// If a max depth is given, then you know its a tree fetch, and limits should be ignored
|
||||||
(i64::MAX, 0)
|
// TODO a kludge to prevent attacks. Limit comments to 300 for now.
|
||||||
|
// (i64::MAX, 0)
|
||||||
|
(300, 0)
|
||||||
} else {
|
} else {
|
||||||
limit_and_offset_unlimited(self.page, self.limit)
|
// limit_and_offset_unlimited(self.page, self.limit)
|
||||||
|
limit_and_offset(self.page, self.limit)?
|
||||||
};
|
};
|
||||||
|
|
||||||
query = match self.sort.unwrap_or(CommentSortType::Hot) {
|
query = match self.sort.unwrap_or(CommentSortType::Hot) {
|
||||||
|
Loading…
Reference in New Issue
Block a user