mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
Apply consistent style to node-red-nodes
(not updating npm for this yet - just whitespace)
This commit is contained in:
@@ -43,17 +43,17 @@ module.exports = function(RED) {
|
||||
else { http = require("http"); }
|
||||
this.on("input", function(msg) {
|
||||
this.url = this.baseurl + '/input/post.json?';
|
||||
if(msg.payload.indexOf(':') > -1){
|
||||
if (msg.payload.indexOf(':') > -1){
|
||||
this.url += 'json={' + msg.payload + '}';
|
||||
} else {
|
||||
this.url += 'csv='+msg.payload;
|
||||
}
|
||||
this.url += '&apikey='+this.apikey;
|
||||
var nodegroup = this.nodegroup || msg.nodegroup;
|
||||
if(nodegroup !== ""){
|
||||
if (nodegroup !== ""){
|
||||
this.url += '&node=' + nodegroup;
|
||||
}
|
||||
if(typeof msg.time !== 'undefined'){
|
||||
if (typeof msg.time !== 'undefined'){
|
||||
this.url += '&time=' + msg.time;
|
||||
}
|
||||
node.log("[emoncms] "+this.url);
|
||||
|
@@ -39,7 +39,7 @@ module.exports = function(RED) {
|
||||
line += data.toString();
|
||||
});
|
||||
//ex.stderr.on('data', function (data) {
|
||||
//console.log('[ping] stderr: ' + data);
|
||||
//console.log('[ping] stderr: ' + data);
|
||||
//});
|
||||
ex.on('close', function (code) {
|
||||
var m = regex.exec(line)||"";
|
||||
|
Reference in New Issue
Block a user