Errors matters and order of refresh too

This commit is contained in:
gjudic 2021-01-06 22:38:26 +01:00
parent 08a4c9b155
commit c513a3cc5a

View File

@ -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);
}
}); });
}); });
})(); })();