Skip to content

Commit

Permalink
feat: order by created at prayge
Browse files Browse the repository at this point in the history
  • Loading branch information
RishikeshNK committed Nov 21, 2024
1 parent 55a5f36 commit 2472634
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/api/src/router/review.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const reviewRouter = {
].filter(Boolean);

return ctx.db.query.Review.findMany({
orderBy: desc(Review.id),
orderBy: desc(Review.createdAt),
where: conditions.length > 0 ? and(...conditions) : undefined,
});
}),
Expand Down

0 comments on commit 2472634

Please sign in to comment.