minor fix

This commit is contained in:
AJ ONeal 2018-01-29 15:54:56 -07:00
parent 04057aa94a
commit ae1720bed3
2 changed files with 3 additions and 2 deletions

View File

@ -312,7 +312,7 @@ module.exports.query = function (engine, query, cb) {
return getSoa(engine, myDomains[0], results, cb, answerSoa);
}
return getNs(engine, /*myDomains.slice(0)*/qnames.map(function (qn) { return { id: qn }; }), results, function (err, results) {
return getNs(engine, /*myDomains.slice(0)*/qnames, results, function (err, results) {
//console.log('[DEV] getNs complete');
if (err) { cb(err, results); return; }

View File

@ -16,7 +16,8 @@ module.exports.create = function (opts) {
//
db.primaryNameservers.forEach(function (ns, i, arr) {
if ('string' === typeof ns) {
arr[i] = { name: ns };
ns = { name: ns };
arr[i] = ns;
}
if (!ns.id) {
ns.id = crypto.randomBytes(16).toString('hex');