mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
updates for new version of nma package
This commit is contained in:
parent
e5d75fbd9b
commit
24282291f4
@ -32,11 +32,17 @@ module.exports = function(RED) {
|
|||||||
}
|
}
|
||||||
else { msg.payload = msg.payload.toString(); }
|
else { msg.payload = msg.payload.toString(); }
|
||||||
if (node.pushkey) {
|
if (node.pushkey) {
|
||||||
try {
|
nma({
|
||||||
nma(node.pushkey, "Node-RED", titl, msg.payload, 0 );
|
"apikey": node.pushkey,
|
||||||
} catch (e) {
|
"application": "Node-RED",
|
||||||
node.warn("NMA error: "+ e);
|
"event": titl,
|
||||||
}
|
"description": msg.payload,
|
||||||
|
"priority": 0
|
||||||
|
}, function (error) {
|
||||||
|
if (error) {
|
||||||
|
node.warn("NMA error: " + error);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
node.warn("NMA credentials not set.");
|
node.warn("NMA credentials not set.");
|
||||||
|
Loading…
Reference in New Issue
Block a user