mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-11 06:25:57 +00:00
Add back console command
This commit is contained in:
parent
ae029a5959
commit
c453a85dde
@ -24,6 +24,16 @@ class Console {
|
||||
this.events.setCommandHandler("console:history", (cb) => this.getHistory(process.env.DEFAULT_CMD_HISTORY_SIZE, cb));
|
||||
this.registerEmbarkJs();
|
||||
this.registerConsoleCommands();
|
||||
this.registerApi();
|
||||
}
|
||||
|
||||
registerApi() {
|
||||
let plugin = this.plugins.createPlugin('consoleApi', {});
|
||||
plugin.registerAPICall('post', '/embark-api/command', (req, res) => {
|
||||
this.executeCmd(req.body.command, (_err, result) => {
|
||||
res.send({result});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
processEmbarkCmd (cmd) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user