summaryrefslogtreecommitdiffstats
path: root/server/src/api/post.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/api/post.rs')
-rw-r--r--server/src/api/post.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/src/api/post.rs b/server/src/api/post.rs
index e507aba3..e1c9b778 100644
--- a/server/src/api/post.rs
+++ b/server/src/api/post.rs
@@ -238,7 +238,10 @@ impl Perform<GetPostsResponse> for Oper<GetPosts> {
let type_ = ListingType::from_str(&data.type_)?;
let sort = SortType::from_str(&data.sort)?;
- let posts = match PostViewQuery::create(&conn, type_, &sort, show_nsfw, false, false)
+ let posts = match PostQueryBuilder::create(&conn)
+ .listing_type(type_)
+ .sort(&sort)
+ .show_nsfw(show_nsfw)
.for_community_id_optional(data.community_id)
.my_user_id_optional(user_id)
.page_optional(data.page)