Skip to content

Commit 909133c

Browse files
committed
chore: added all selected columns to the groupBy function
1 parent add6fea commit 909133c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

server/api/router/post.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,17 @@ export const postRouter = createTRPCRouter({
348348
cursor ? paginationMapping[sort].cursor : undefined,
349349
),
350350
)
351-
.groupBy(post.id, bookmarked.id, user.id)
351+
.groupBy(
352+
post.id,
353+
post.slug,
354+
post.title,
355+
post.excerpt,
356+
post.published,
357+
post.readTimeMins,
358+
post.likes,
359+
bookmarked.id,
360+
user.id,
361+
)
352362
.limit(limit + 1)
353363
.orderBy(paginationMapping[sort].orderBy);
354364

0 commit comments

Comments
 (0)