From 73df6a8dd7933d716416e829c2f55742ac368928 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Thu, 15 Sep 2016 14:11:13 +0200 Subject: [PATCH] empty subdomain value is represented as @ in DO --- src/dns/digitalocean.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/dns/digitalocean.js b/src/dns/digitalocean.js index e73b1e7b8..bee025c71 100644 --- a/src/dns/digitalocean.js +++ b/src/dns/digitalocean.js @@ -49,6 +49,8 @@ function upsert(dnsConfig, zoneName, subdomain, type, values, callback) { assert(util.isArray(values)); assert.strictEqual(typeof callback, 'function'); + subdomain = subdomain || '@'; + debug('upsert: %s for zone %s of type %s with values %j', subdomain, zoneName, type, values); getInternal(dnsConfig, zoneName, subdomain, type, function (error, result) { @@ -95,6 +97,8 @@ function get(dnsConfig, zoneName, subdomain, type, callback) { assert.strictEqual(typeof type, 'string'); assert.strictEqual(typeof callback, 'function'); + subdomain = subdomain || '@'; + getInternal(dnsConfig, zoneName, subdomain, type, function (error, result) { if (error) return callback(error); @@ -115,6 +119,8 @@ function del(dnsConfig, zoneName, subdomain, type, values, callback) { assert(util.isArray(values)); assert.strictEqual(typeof callback, 'function'); + subdomain = subdomain || '@'; + getInternal(dnsConfig, zoneName, subdomain, type, function (error, result) { if (error) return callback(error);