1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

Twilio creds could not be entered - to fix #357

(bad token object)
This commit is contained in:
Dave Conway-Jones 2017-09-11 11:57:32 +01:00
parent 8b53d09ad3
commit 86ab73662b
No known key found for this signature in database
GPG Key ID: 81B04231572A9A2D
3 changed files with 8 additions and 9 deletions

View File

@ -74,13 +74,12 @@
RED.nodes.registerType('twilio-api',{
category: 'config',
defaults: {
name: {value:""},
sid: {value:"",required:true},
from: {value:"",required:true},
// token -> credentials
name: { value: ""}
from: {value:"",required:true}
},
credentials: {
token: "password"
token: {type: "password"}
},
label: function() {
return this.name||this.from;

View File

@ -10,7 +10,7 @@ module.exports = function(RED) {
}
RED.httpAdmin.get('/twilio-api/global', RED.auth.needsPermission("twilio.read"), function(req,res) {
res.json({hasToken:!(twiliokey && twiliokey.account && twiliokey.authtoken)});
res.json({hasToken:!!(twiliokey && twiliokey.account && twiliokey.authtoken)});
});
function TwilioAPINode(n) {

View File

@ -1,6 +1,6 @@
{
"name" : "node-red-node-twilio",
"version" : "0.0.14",
"version" : "0.0.15",
"description" : "A Node-RED node to send SMS messages via the Twilio service.",
"dependencies" : {
"twilio" : "^2.11.1"