mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: #9483, fix events count display
This commit is contained in:
@@ -82,9 +82,9 @@ async function listPlugins() {
|
||||
process.exit();
|
||||
}
|
||||
|
||||
async function listEvents(count) {
|
||||
async function listEvents(count = 10) {
|
||||
await db.init();
|
||||
const eventData = await events.getEvents('', 0, (count || 10) - 1);
|
||||
const eventData = await events.getEvents('', 0, count - 1);
|
||||
console.log((`\nDisplaying last ${count} administrative events...`).bold);
|
||||
eventData.forEach((event) => {
|
||||
console.log(` * ${String(event.timestampISO).green} ${String(event.type).yellow}${event.text ? ` ${event.text}` : ''}${' (uid: '.reset}${event.uid ? event.uid : 0})`);
|
||||
|
||||
Reference in New Issue
Block a user