bug is only in wildwestmode
This commit is contained in:
parent
5a65eaae18
commit
ec2383b998
|
@ -212,7 +212,7 @@ const subClause = (sub, num, table, me, showNsfw) => {
|
|||
return excludeMuted + ' AND ' + HIDE_NSFW_CLAUSE
|
||||
}
|
||||
|
||||
function investmentClause (sats = 10) {
|
||||
function investmentClause (sats) {
|
||||
return `(
|
||||
CASE WHEN "Item"."parentId" IS NULL
|
||||
THEN ("Item".cost + "Item".boost + ("Item".msats / 1000)) >= ${sats}
|
||||
|
@ -238,11 +238,10 @@ export async function filterClause (me, models, type) {
|
|||
if (me) {
|
||||
const user = await models.user.findUnique({ where: { id: me.id } })
|
||||
|
||||
const satsFilterClause = investmentClause(user.satsFilter)
|
||||
satsFilter = `(${satsFilterClause} OR "Item"."userId" = ${me.id})`
|
||||
satsFilter = `(${investmentClause(user.satsFilter)} OR "Item"."userId" = ${me.id})`
|
||||
|
||||
if (user.wildWestMode) {
|
||||
return investmentClause
|
||||
return satsFilter
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue