All command available in backend tab console
This commit is contained in:
parent
eb86bd7fbf
commit
e4fd9ab3ba
|
@ -3,6 +3,7 @@ let utils = require('../../utils/utils');
|
|||
const EmbarkJS = require('embarkjs');
|
||||
const IpfsApi = require('ipfs-api');
|
||||
const Web3 = require('web3');
|
||||
const stringify = require('json-stringify-safe');
|
||||
|
||||
class Console {
|
||||
constructor(_embark, options) {
|
||||
|
@ -31,7 +32,7 @@ class Console {
|
|||
let plugin = this.plugins.createPlugin('consoleApi', {});
|
||||
plugin.registerAPICall('post', '/embark-api/command', (req, res) => {
|
||||
this.executeCmd(req.body.command, (_err, result) => {
|
||||
res.send({result});
|
||||
res.send({result: stringify(result, null, 2)});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue