Errors matters and order of refresh too
This commit is contained in:
parent
08a4c9b155
commit
c513a3cc5a
23
myDNS.js
23
myDNS.js
@ -15,11 +15,24 @@ var ovh = require('ovh')({
|
|||||||
ovh.request('PUT', '/domain/zone/' + element.domain + '/record/' + element.id, {
|
ovh.request('PUT', '/domain/zone/' + element.domain + '/record/' + element.id, {
|
||||||
target : myip
|
target : myip
|
||||||
}, function (err, result) {
|
}, function (err, result) {
|
||||||
console.log(err || result);
|
if(err == null || result == null)
|
||||||
console.log("Le domaine " + element.domain + " a ete match avec l'IP " + myip);
|
{
|
||||||
});
|
console.log("Le domaine " + element.domain + " a ete match avec l'IP " + myip);
|
||||||
ovh.request('POST', '/domain/zone/' + element.domain + '/refresh', function (err, result) {
|
ovh.request('POST', '/domain/zone/' + element.domain + '/refresh', function (err, result) {
|
||||||
console.log(err || result);
|
if(err == null || result == null)
|
||||||
|
{
|
||||||
|
console.log("Le domaine " + element.domain + " a ete refresh");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
console.log(err || result);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
console.log(err || result);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
})();
|
})();
|
Loading…
Reference in New Issue
Block a user