fixing btc

This commit is contained in:
martind2000 2017-06-12 13:47:24 +01:00
parent bcc7a3d87e
commit 287ebbffa0

View File

@ -23,11 +23,16 @@ exports.doBTC = function (req, res) {
});
response.on('end', function () {
console.log('>> data', data);
let cData = {};
try {
callback(JSON.parse(data), r);
} catch (e) {
cData = JSON.parse(data);
}
catch (e) {
console.error(e);
}
finally{
callback(cData, r);
}
});
response.on('error', function (e) {