fixing btc
This commit is contained in:
parent
bcc7a3d87e
commit
287ebbffa0
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user