comparison mod_audit/mod_audit.lua @ 5319:5043108b14f4

mod_audit: Display most recent entries first, rather than showing oldest This matches the output of 'lastb'.
author Matthew Wild <mwild1@gmail.com>
date Fri, 07 Apr 2023 12:03:29 +0100
parents c5ecfb06afde
children d02f465e2aff
comparison
equal deleted inserted replaced
5318:c5ecfb06afde 5319:5043108b14f4
140 local c = 0; 140 local c = 0;
141 141
142 local results, err = store:find(nil, { 142 local results, err = store:find(nil, {
143 with = arg.user; 143 with = arg.user;
144 limit = arg.limit and tonumber(arg.limit) or nil; 144 limit = arg.limit and tonumber(arg.limit) or nil;
145 reverse = true;
145 }) 146 })
146 if not results then 147 if not results then
147 print("EE: Failed to query audit log: "..tostring(err)); 148 print("EE: Failed to query audit log: "..tostring(err));
148 return 1; 149 return 1;
149 end 150 end