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
3 changed files with 8 additions and 9 deletions

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) {
@@ -22,7 +22,7 @@ module.exports = function(RED) {
if (credentials) { this.token = credentials.token; }
}
RED.nodes.registerType("twilio-api",TwilioAPINode,{
credentials: { token: "password" }
credentials: { token:"password" }
});