Refine hashtag and stock query counts to only include positions with shares greater than zero
Build Images and Deploy / Update-PROD-Stack (push) Successful in 1m48s

This commit is contained in:
2026-04-29 21:32:51 -04:00
parent e6e1b895e7
commit ad15792621
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ export default async function AdminStocksPage({ searchParams }: Props) {
skip, skip,
take: pageSize, take: pageSize,
include: { include: {
_count: { select: { positions: true, trades: true } }, _count: { select: { positions: { where: { shares: { gt: 0 } } }, trades: true } },
}, },
}), }),
prisma.hashtag.count({ where }), prisma.hashtag.count({ where }),
+2 -2
View File
@@ -86,7 +86,7 @@ export default async function StocksPage({ searchParams }: PageProps) {
take: 2, take: 2,
select: { price: true, postsPerHour: true }, select: { price: true, postsPerHour: true },
}, },
_count: { select: { positions: true } }, _count: { select: { positions: { where: { shares: { gt: 0 } } } } },
}, },
}) })
@@ -138,7 +138,7 @@ export default async function StocksPage({ searchParams }: PageProps) {
take: 2, take: 2,
select: { price: true, postsPerHour: true }, select: { price: true, postsPerHour: true },
}, },
_count: { select: { positions: true } }, _count: { select: { positions: { where: { shares: { gt: 0 } } } } },
}, },
}) })
.then((rows) => .then((rows) =>