chadsmith / node-namecheap

Node.js library for the NameCheap API
http://twitter.com/chadsmith
53 stars 25 forks source link

`namecheap.domains.dns.getHosts` doesnt return the correct response #7

Open phenax opened 4 years ago

phenax commented 4 years ago

namecheap.domains.dns.getHosts returns 'namecheap.domains.dns.getHosts' as a string instead of the full response. The problem seems to be a line in instance.command function (Line 597)

marcpujolapps commented 2 years ago

You should change line 596 from namecheap.js from res = res ? res[Object.keys(res)[0]] : undefined; to res = res ? res[Object.keys(res)[1]] : undefined;