Skip to content

Commit

Permalink
minor stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
gkpty committed Sep 9, 2020
1 parent 4b2cff2 commit 6161817
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
5 changes: 3 additions & 2 deletions lib/nameservers/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ function aws(domain, nameservers){
//GoDaddy
function godaddy(domain, nameservers){
return new Promise((resolve, reject) => {
console.log('EXECUTING NAMESERVER UPDATE ', domain, nameservers)
var url = `https://api.godaddy.com/v1/domains/${domain}`
axios({
method: 'patch',
Expand All @@ -37,8 +38,8 @@ function godaddy(domain, nameservers){
"nameServers": nameservers
}
})
.then(res => resolve(res.data))
.catch(err => reject(err))
.then(response => resolve(response.data))
.catch(error => reject(error))
})
}

Expand Down
5 changes: 5 additions & 0 deletions test/deleteAllRecordsTest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const deleteAllRecords = require('../lib/records/deleteAll')

deleteAllRecords.aws('localizehtml.com')
.then(data => console.log(data))
.catch(err => console.log(err))
12 changes: 7 additions & 5 deletions test/updateNameserversTest.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
const dns = require('../index')

const ns = [
'ns-95.awsdns-54.net',
'ns-260.awsdns-43.com',
'ns-1873.awsdns-31.co.uk',
'ns-1050.awsdns-02.org'
'ns-822.awsdns-38.net',
'ns-19.awsdns-02.com',
'ns-1238.awsdns-26.org',
'ns-2034.awsdns-62.co.uk'
]
dns.godaddy.updateNameServers('localizehtml.com', ns).then(data=>console.log(data)).catch(err=>console.log(err))

dns.godaddy.updateNameservers('localizehtml.com', ns)
.then(data=>console.log(data)).catch(err=>console.log(err))
//updateNameServers.aws('torusframework.com', ns).then(data=>console.log(data)).catch(err=>console.log(err))

0 comments on commit 6161817

Please sign in to comment.