feat: closes #12453, filter events by user/group

This commit is contained in:
Barış Soner Uşaklı
2024-04-01 18:19:58 -04:00
parent 73f985684c
commit 4030f18a04
8 changed files with 191 additions and 22 deletions

View File

@@ -130,7 +130,11 @@ async function listPlugins() {
async function listEvents(count = 10) {
await db.init();
const eventData = await events.getEvents('', 0, count - 1);
const eventData = await events.getEvents({
filter: '',
start: 0,
stop: count - 1,
});
console.log(chalk.bold(`\nDisplaying last ${count} administrative events...`));
eventData.forEach((event) => {
console.log(` * ${chalk.green(String(event.timestampISO))} ${chalk.yellow(String(event.type))}${event.text ? ` ${event.text}` : ''} (uid: ${event.uid ? event.uid : 0})`);