mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-05 15:32:19 +00:00
Also order by id
This commit is contained in:
parent
0e649883cb
commit
ebd99f95a3
3 changed files with 4 additions and 3 deletions
|
|
@ -94,6 +94,7 @@ function getWhere(data: Q) {
|
|||
export function queryRequest(data: Q) {
|
||||
return db
|
||||
.select({
|
||||
id: requestAuditLog.id,
|
||||
timestamp: requestAuditLog.timestamp,
|
||||
orgId: requestAuditLog.orgId,
|
||||
action: requestAuditLog.action,
|
||||
|
|
@ -123,7 +124,7 @@ export function queryRequest(data: Q) {
|
|||
eq(requestAuditLog.resourceId, resources.resourceId)
|
||||
) // TODO: Is this efficient?
|
||||
.where(getWhere(data))
|
||||
.orderBy(desc(requestAuditLog.timestamp));
|
||||
.orderBy(desc(requestAuditLog.timestamp), desc(requestAuditLog.id));
|
||||
}
|
||||
|
||||
export function countRequestQuery(data: Q) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue