New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

node-red-contrib-ibmpush

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-contrib-ibmpush - npm Package Compare versions

Comparing version

to
0.1.12

30

ibmpush/88-ibmpush.js
/**
* Copyright 2014 IBM Corp.
* Copyright 2014, 2015 IBM Corp.
*

@@ -21,5 +21,3 @@ * Licensed under the Apache License, Version 2.0 (the "License"); you may not

var ibmpush = require('ibmpush');
var querystring = require("querystring");
var isVCapEnv = process.env.VCAP_APPLICATION ? true:false;

@@ -55,21 +53,13 @@

RED.httpAdmin.post('/ibmpush/:id', function(req,res) {
var body = "";
var newCreds = req.body;
var credentials = RED.nodes.getCredentials(req.params.id) || {};
req.on('data', function(chunk) {
body += chunk;
});
if (newCreds.password == "") {
delete credentials.password;
} else {
credentials.password = newCreds.password || credentials.password;
}
req.on('end', function() {
var newCreds = querystring.parse(body);
var credentials = RED.nodes.getCredentials(req.params.id) || {};
if (newCreds.password == "") {
delete credentials.password;
} else {
credentials.password = newCreds.password || credentials.password;
}
RED.nodes.addCredentials(req.params.id, credentials);
res.send(200);
});
RED.nodes.addCredentials(req.params.id, credentials);
res.send(200);
});

@@ -76,0 +66,0 @@

{
"name": "node-red-contrib-ibmpush",
"version": "0.1.11",
"version": "0.1.12",
"license": "Apache",

@@ -5,0 +5,0 @@ "repository" : {

Sorry, the diff of this file is not supported yet