mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
Re-lint a load of nodes
This commit is contained in:
@@ -39,10 +39,12 @@ module.exports = function(RED) {
|
||||
if (this.api) {
|
||||
this.twilioClient = twilio(this.api.sid,this.api.token);
|
||||
this.fromNumber = this.api.from;
|
||||
} else if (twiliokey) {
|
||||
}
|
||||
else if (twiliokey) {
|
||||
this.twilioClient = twilio(twiliokey.account, twiliokey.authtoken);
|
||||
this.fromNumber = twiliokey.from;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
this.error("missing twilio credentials");
|
||||
return;
|
||||
}
|
||||
@@ -66,7 +68,8 @@ module.exports = function(RED) {
|
||||
}
|
||||
//console.log(response);
|
||||
});
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// Send SMS
|
||||
node.twilioClient.sendMessage( {to: tonum, from: node.fromNumber, body: msg.payload}, function(err, response) {
|
||||
if (err) {
|
||||
@@ -76,7 +79,8 @@ module.exports = function(RED) {
|
||||
});
|
||||
}
|
||||
|
||||
} catch (err) {
|
||||
}
|
||||
catch (err) {
|
||||
node.error(err);
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user