replace underscore with our own
we only need like 5 simple functions
This commit is contained in:
+3
-3
@@ -20,7 +20,7 @@ const assert = require('assert'),
|
||||
dns = require('../dns.js'),
|
||||
GCDNS = require('@google-cloud/dns').DNS,
|
||||
waitForDns = require('./waitfordns.js'),
|
||||
_ = require('underscore');
|
||||
_ = require('../underscore.js');
|
||||
|
||||
function removePrivateFields(domainObject) {
|
||||
domainObject.config.credentials.private_key = constants.SECRET_PLACEHOLDER;
|
||||
@@ -176,8 +176,8 @@ async function verifyDomainConfig(domainObject) {
|
||||
|
||||
const zone = await getZoneByName(credentials, zoneName);
|
||||
|
||||
const definedNS = zone.metadata.nameServers.sort().map(function(r) { return r.replace(/\.$/, ''); });
|
||||
if (!_.isEqual(definedNS, nameservers.sort())) {
|
||||
const definedNS = zone.metadata.nameServers.map(function(r) { return r.replace(/\.$/, ''); });
|
||||
if (!_.isEqual(definedNS.sort(), nameservers.sort())) {
|
||||
debug('verifyDomainConfig: %j and %j do not match', nameservers, definedNS);
|
||||
throw new BoxError(BoxError.BAD_FIELD, 'Domain nameservers are not set to Google Cloud DNS');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user