From ebcfac72e755217945ecb188d8ef2f07a947cdbd Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 6 Jul 2017 23:26:58 +0000 Subject: [PATCH] fix promise, and whitespace --- lib/apis.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/apis.js b/lib/apis.js index e63673f..cc707ed 100644 --- a/lib/apis.js +++ b/lib/apis.js @@ -49,12 +49,13 @@ module.exports.create = function (xconfx, apiFactories, apiDeps) { })) { return true; } - if (clientUrih === ('api.' + xconfx.setupDomain) && 'org.oauth3.consumer' === pkgId) { - // fallthrough - return true; - } else { - return null; - } + + if (clientUrih === ('api.' + xconfx.setupDomain) && 'org.oauth3.consumer' === pkgId) { + // fallthrough + return true; + } else { + return null; + } }); } @@ -437,7 +438,7 @@ module.exports.create = function (xconfx, apiFactories, apiDeps) { var Twilio = require('twilio'); function twilioTel(/*opts*/) { if (_twilio) { - return _twilio; + return apiDeps.Promise.resolve(_twilio); } _twilio = new Twilio.RestClient( @@ -552,7 +553,8 @@ module.exports.create = function (xconfx, apiFactories, apiDeps) { // // Capabilities for APIs // - 'mailer@daplie.com': mailgunMail // whichever mailer + 'email@daplie.com': mailgunMail // whichever mailer + , 'mailer@daplie.com': mailgunMail // whichever mailer , 'mailgun@daplie.com': mailgunMail // specifically mailgun , 'tel@daplie.com': daplieTel // whichever telephony service , 'twilio@daplie.com': twilioTel // specifically twilio