refactor command handler

This commit is contained in:
Iuri Matias 2018-03-15 16:38:20 -04:00
parent cd9c3c8317
commit 89616537b8
1 changed files with 1 additions and 3 deletions

View File

@ -35,9 +35,7 @@ class Dashboard {
self.events.on('status', monitor.setStatus.bind(monitor));
self.events.on('servicesState', monitor.availableServices.bind(monitor));
self.events.setCommandHandler("console:command", (cmd, cb) => {
cb(monitor.executeCmd(cmd));
});
self.events.setCommandHandler("console:command", monitor.executeCmd.bind(monitor));
self.logger.info('========================'.bold.green);
self.logger.info(('Welcome to Embark ' + self.version).yellow.bold);