mirror of https://github.com/embarklabs/embark.git
return profiler object instead of text
This commit is contained in:
parent
7e96eb661e
commit
efbe71f5e2
|
@ -80,11 +80,11 @@ class Profiler {
|
||||||
//self.events.request('contracts:contract', req.params.contractName, res.send.bind(res));
|
//self.events.request('contracts:contract', req.params.contractName, res.send.bind(res));
|
||||||
self.events.request('contracts:contract', contractName, (contract) => {
|
self.events.request('contracts:contract', contractName, (contract) => {
|
||||||
if (!contract || !contract.deployedAddress) {
|
if (!contract || !contract.deployedAddress) {
|
||||||
return res.send("-- couldn't profile " + contractName + " - it's not deployed or could be an interface");
|
return res.send({error: "-- couldn't profile " + contractName + " - it's not deployed or could be an interface"});
|
||||||
}
|
}
|
||||||
self.profile(contractName, contract, (err, table) => {
|
self.profileJSON(contractName, contract, (err, table) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
return res.send(err);
|
return res.send({error: err});
|
||||||
}
|
}
|
||||||
res.send(table);
|
res.send(table);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue