- .is_ok();
-
- let posts = PostQuery::builder()
- .pool(&mut context.pool())
- .local_user(local_user_view.map(|l| l.local_user).as_ref())
- .listing_type(Some(listing_type))
- .sort(sort)
- .community_id(community_id)
- .saved_only(saved_only)
- .page(page)
- .limit(limit)
- .is_mod_or_admin(Some(is_mod_or_admin))
- .build()
- .list()
- .await
- .with_lemmy_type(LemmyErrorType::CouldntGetPosts)?;
+ .is_ok(),
+ );
+
+ let posts = PostQuery {
+ local_user: local_user_view.map(|l| l.local_user).as_ref(),
+ listing_type,
+ sort,
+ community_id,
+ saved_only,
+ page,
+ limit,
+ is_mod_or_admin,
+ ..Default::default()
+ }
+ .list(&mut context.pool())
+ .await
+ .with_lemmy_type(LemmyErrorType::CouldntGetPosts)?;