From 85e91ede47be367507cc69c7741b4f421f38557c Mon Sep 17 00:00:00 2001 From: k00b Date: Tue, 20 Aug 2024 21:09:52 -0500 Subject: [PATCH] show only active items with comments on random --- api/resolvers/item.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/resolvers/item.js b/api/resolvers/item.js index 6156988a..109fe466 100644 --- a/api/resolvers/item.js +++ b/api/resolvers/item.js @@ -412,10 +412,12 @@ export default { ${whereClause( '"Item"."deletedAt" IS NULL', '"Item"."weightedVotes" - "Item"."weightedDownVotes" > 2', + '"Item"."ncomments" > 0', type === 'posts' && '"Item"."subName" IS NOT NULL', subClause(sub, 3, subClauseTable(type), me, showNsfw), typeClause(type), await filterClause(me, models, type), + activeOrMine(me), muteClause(me))} ${orderByClause('random', me, models, type)} OFFSET $1