Skip to content

Commit

Permalink
Refactor tag filtering in feed.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
thebkht committed Nov 27, 2023
1 parent 09110e6 commit f135075
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/prisma/feed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ const sortedTagIds = Object.entries(tagCounts)
.map(([tagId]) => tagId)

const posts = await postgres.post.findMany({
where: { tags: { some: { tagId: { in: sortedTagIds.slice(0, 5) } } } },
where: { tags: { some: { tagId: { in: sortedTagIds } } } },
select: { id: true },
});

Expand Down

0 comments on commit f135075

Please sign in to comment.