integration tests passed
This commit is contained in:
parent
16db087c19
commit
477e3dba33
|
@ -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;
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue