From 2d575477780c7cbc1696a570a8bdd78fd64c156a Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Wed, 1 Aug 2018 14:02:37 -0400 Subject: [PATCH] return profiler object instead of text --- lib/modules/profiler/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/modules/profiler/index.js b/lib/modules/profiler/index.js index 1ce550a7..400ba13f 100644 --- a/lib/modules/profiler/index.js +++ b/lib/modules/profiler/index.js @@ -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); });