bugfix: list all zones

This commit is contained in:
AJ ONeal 2019-07-23 02:24:47 -06:00
parent 91a8c8b237
commit 705902ff32
1 changed files with 7 additions and 3 deletions

View File

@ -75,7 +75,7 @@ module.exports.create = function(config) {
var i;
var len = result['ApiResponse']['Errors'].length;
for (i = 0; i < len; i += 1) {
console.log(result['ApiResponse']['Errors'][i]);
console.error(result['ApiResponse']['Errors'][i]);
}
throw new Error('API Error');
});
@ -94,9 +94,13 @@ module.exports.create = function(config) {
) {
// console.log('zones');
// console.log(zonesResponse);
return zonesResponse['DomainGetListResult'].map(function(x) {
return x['Domain'][0]['$']['Name'];
var zones = zonesResponse['DomainGetListResult'][0][
'Domain'
].map(function(el) {
return el['$']['Name'];
});
//console.log(zones);
return zones;
});
},