Comparing version 0.1.0 to 0.1.1
@@ -7,14 +7,15 @@ const request = require('request'); | ||
filter = JSON.stringify(filter); | ||
request(`${api}?filter=${filter}`, function (err, result) { | ||
if (err) throw err; | ||
result.forEach((item) => { | ||
const payload = utils.decodeTopic(item.topic); | ||
let message = item.message; | ||
try { | ||
message = JSON.parse(message); | ||
} catch (err) {} | ||
payload.message = message; | ||
handler(null, payload); | ||
}); | ||
request(`${api}?filter=${filter}`, function (err, res, result) { | ||
result = JSON.parse(result); | ||
if (err) throw err; | ||
result.forEach((item) => { | ||
const payload = utils.decodeTopic(item.topic); | ||
let message = item.message; | ||
try { | ||
message = JSON.parse(message); | ||
} catch (err) {} | ||
payload.message = message; | ||
handler(null, payload); | ||
}); | ||
}); | ||
}; |
{ | ||
"name": "pubsubr", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "pub and sub to loopback components", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24531
550