bugfix: list all zones

This commit is contained in:
AJ ONeal 2019-07-23 02:24:47 -06:00
bovenliggende 91a8c8b237
commit 705902ff32
1 gewijzigde bestanden met toevoegingen van 7 en 3 verwijderingen

Bestand weergeven

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