Fix missing local user from post queries. (#2447)

pull/2449/head
Dessalines 2 years ago committed by GitHub
parent c9f1407429
commit 9ce15ed071
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -53,6 +53,7 @@ impl PerformCrud for GetPosts {
let mut posts = blocking(context.pool(), move |conn| {
PostQuery::builder()
.conn(conn)
.local_user(local_user_view.map(|l| l.local_user).as_ref())
.listing_type(Some(listing_type))
.sort(sort)
.community_id(community_id)

@ -68,9 +68,9 @@ impl PerformCrud for GetPersonDetails {
let posts = blocking(context.pool(), move |conn| {
let posts_query = PostQuery::builder()
.conn(conn)
.local_user(local_user.as_ref())
.sort(sort)
.saved_only(saved_only)
.local_user(local_user.as_ref())
.community_id(community_id)
.page(page)
.limit(limit);

Loading…
Cancel
Save