Make wildcard a separate provider

this is required because the config object is not returned for
locked domains and the UI display for the provider field is then
wrong.
This commit is contained in:
Girish Ramakrishnan
2018-09-06 19:58:46 -07:00
parent 44ed650538
commit 004f00a97b
3 changed files with 23 additions and 3 deletions
-2
View File
@@ -55,11 +55,9 @@ function verifyDnsConfig(dnsConfig, domain, zoneName, ip, callback) {
assert.strictEqual(typeof ip, 'string');
assert.strictEqual(typeof callback, 'function');
if ('wildcard' in dnsConfig && typeof dnsConfig.wildcard !== 'boolean') return callback(new DomainsError(DomainsError.BAD_FIELD, 'wildcard must be a boolean'));
if ('hyphenatedSubdomains' in dnsConfig && typeof dnsConfig.hyphenatedSubdomains !== 'boolean') return callback(new DomainsError(DomainsError.BAD_FIELD, 'hyphenatedSubdomains must be a boolean'));
var config = {
wildcard: !!dnsConfig.wildcard,
hyphenatedSubdomains: !!dnsConfig.hyphenatedSubdomains
};