From dc5611fe4519dac61cd347a1d9c047970edd1892 Mon Sep 17 00:00:00 2001 From: Commonly <51011212+commonly-ts@users.noreply.github.com> Date: Mon, 20 Nov 2023 10:21:53 +0000 Subject: [PATCH] Fixed onAuditLog not working (#772) * Fix onAuditLog fetching oldest audit logs Added sortOrder argument to return the newest audit logs rather than only fetching the oldest ones, resulting in nothing coming through when using onAuditLog. * Changed double quotes to single --- lib/groups/onAuditLog.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/groups/onAuditLog.js b/lib/groups/onAuditLog.js index e30869e41..667a6b1ea 100644 --- a/lib/groups/onAuditLog.js +++ b/lib/groups/onAuditLog.js @@ -30,7 +30,7 @@ exports.func = function (args) { let empty = false return shortPoll({ getLatest: function (latest) { - return getAuditLog({ group: args.group, jar: args.jar }) + return getAuditLog({ group: args.group, jar: args.jar, sortOrder: 'Desc' }) .then(function (audit) { const given = [] if (audit) {