feat: enabled order by desc for audit log and added sort for couple of get queries

This commit is contained in:
Akhil Mohan
2024-02-02 20:56:42 +05:30
parent 72d46efba5
commit 937e48dbc5
4 changed files with 6 additions and 4 deletions
@@ -38,7 +38,8 @@ export const auditLogDALFactory = (db: TDbClient) => {
})
)
.limit(limit)
.offset(offset);
.offset(offset)
.orderBy("createdAt", "desc");
if (startDate) {
void sqlQuery.where("createdAt", ">=", startDate);
}