show only active items with comments on random

This commit is contained in:
k00b 2024-08-20 21:09:52 -05:00
parent accf5212b2
commit 85e91ede47
1 changed files with 2 additions and 0 deletions

View File

@ -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