integration tests passed

This commit is contained in:
Hitesh Walia 2019-07-25 09:06:56 -07:00 committed by Hitesh
parent 16db087c19
commit 477e3dba33
1 changed files with 2 additions and 5 deletions

View File

@ -25,8 +25,6 @@ module.exports.create = function(config) {
return elem.name;
});
});
},
set: function(data) {
// console.info('Add TXT', data);
@ -55,12 +53,11 @@ module.exports.create = function(config) {
return api('GET', '/' + account + '/zones/' + data.challenge.dnsZone + '/records')
.then(function(resp) {
var txtRecord = resp.body.data.filter(function (record) {
var record = resp.body.data.filter(function (record) {
return data.challenge.dnsAuthorization === record.content;
})[0];
//console.log('DEBUG >>> txtRecord: ' + JSON.stringify(txtRecord,null,2));
if(txtRecord) return { dnsAuthorization: txtRecord.content };
if(txtRecord) return { dnsAuthorization: record.content };
else return null;
});