[offers][chore] return comments in reverse chronological order

pull/394/head
Stuart Long Chay Boon 2 years ago
parent 22805022a9
commit bde445859a

@ -25,15 +25,21 @@ export const offersCommentsRouter = createRouter()
include: { include: {
user: true, user: true,
}, },
orderBy: {
createdAt: 'desc'
}
}, },
replyingTo: true, replyingTo: true,
user: true, user: true,
}, },
orderBy: {
createdAt: 'desc'
}
}, },
}, },
where: { where: {
id: input.profileId, id: input.profileId,
}, }
}); });
const discussions: OffersDiscussion = { const discussions: OffersDiscussion = {

Loading…
Cancel
Save