mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
make Prowl consistent with Pushbullet
This commit is contained in:
@@ -75,7 +75,13 @@ RED.httpAdmin.get('/prowl/:id',function(req,res) {
|
||||
var credentials = RED.nodes.getCredentials(req.params.id);
|
||||
if (credentials) {
|
||||
res.send(JSON.stringify({hasPassword:(credentials.pushkey&&credentials.pushkey!="")}));
|
||||
} else {
|
||||
}
|
||||
else if (pushkeys && pushkeys.prowlkey) {
|
||||
RED.nodes.addCredentials(req.params.id,{pushkey:pushkeys.prowlkey,global:true});
|
||||
credentials = RED.nodes.getCredentials(req.params.id);
|
||||
res.send(JSON.stringify({hasPassword:(credentials.pushkey&&credentials.pushkey!=""),global:credentials.global}));;
|
||||
}
|
||||
else {
|
||||
res.send(JSON.stringify({}));
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user