Merge branch 'main' into move_matrix_and_admin_to_person

This commit is contained in:
Dessalines 2021-03-23 14:16:54 -04:00
commit baab2e88a5
5 changed files with 8 additions and 0 deletions

View file

@ -684,12 +684,14 @@ impl Perform for GetComments {
let community_id = data.community_id;
let community_name = data.community_name.to_owned();
let saved_only = data.saved_only;
let page = data.page;
let limit = data.limit;
let comments = blocking(context.pool(), move |conn| {
CommentQueryBuilder::create(conn)
.listing_type(type_)
.sort(&sort)
.saved_only(saved_only)
.community_id(community_id)
.community_name(community_name)
.my_person_id(person_id)

View file

@ -578,6 +578,7 @@ impl Perform for GetPersonDetails {
.my_person_id(person_id)
.sort(&sort)
.saved_only(saved_only)
.community_id(community_id)
.page(page)
.limit(limit);

View file

@ -253,6 +253,8 @@ impl Perform for GetPosts {
let limit = data.limit;
let community_id = data.community_id;
let community_name = data.community_name.to_owned();
let saved_only = data.saved_only;
let posts = match blocking(context.pool(), move |conn| {
PostQueryBuilder::create(conn)
.listing_type(&type_)
@ -260,6 +262,7 @@ impl Perform for GetPosts {
.show_nsfw(show_nsfw)
.community_id(community_id)
.community_name(community_name)
.saved_only(saved_only)
.my_person_id(person_id)
.page(page)
.limit(limit)

View file

@ -70,6 +70,7 @@ pub struct GetComments {
pub limit: Option<i64>,
pub community_id: Option<CommunityId>,
pub community_name: Option<String>,
pub saved_only: bool,
pub auth: Option<String>,
}

View file

@ -49,6 +49,7 @@ pub struct GetPosts {
pub limit: Option<i64>,
pub community_id: Option<CommunityId>,
pub community_name: Option<String>,
pub saved_only: bool,
pub auth: Option<String>,
}