mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-02-02 18:34:09 +00:00
return profiler object instead of text
This commit is contained in:
parent
3382d929a8
commit
2d57547778
@ -80,11 +80,11 @@ class Profiler {
|
||||
//self.events.request('contracts:contract', req.params.contractName, res.send.bind(res));
|
||||
self.events.request('contracts:contract', contractName, (contract) => {
|
||||
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) {
|
||||
return res.send(err);
|
||||
return res.send({error: err});
|
||||
}
|
||||
res.send(table);
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user