@@ -89,8 +89,8 @@ async function setZone(domainConfig, zoneName, hosts) {
|
||||
|
||||
const query = await getQuery(domainConfig);
|
||||
query.Command = 'namecheap.domains.dns.setHosts';
|
||||
query.SLD = zoneName.split('.')[0];
|
||||
query.TLD = zoneName.split('.')[1];
|
||||
query.SLD = zoneName.split('.', 1)[0];
|
||||
query.TLD = zoneName.slice(query.SLD.length + 1);
|
||||
|
||||
// Map to query params https://www.namecheap.com/support/api/methods/domains-dns/set-hosts.aspx
|
||||
hosts.forEach(function (host, i) {
|
||||
|
||||
Reference in New Issue
Block a user