feat: allowing count to be passed to ./nodebb events

This commit is contained in:
Julian Lam
2019-06-12 13:19:28 -04:00
parent de04629745
commit f6d3cc0ea4
3 changed files with 14 additions and 9 deletions

View File

@@ -210,10 +210,10 @@ program
})
.description('List all installed plugins');
program
.command('events')
.description('Outputs the last ten (10) administrative events recorded by NodeBB')
.action(function () {
require('./manage').listEvents();
.command('events [count]')
.description('Outputs the most recent administrative events recorded by NodeBB')
.action(function (count) {
require('./manage').listEvents(count);
});
program
.command('info')

View File

@@ -97,10 +97,10 @@ function listPlugins() {
});
}
function listEvents() {
function listEvents(count) {
async.series([
db.init,
events.output,
async.apply(events.output, count),
]);
}