From d7dea412c2b64571ea374379d27ad75852d1c0f4 Mon Sep 17 00:00:00 2001 From: Graeme Lawes Date: Thu, 13 Jun 2019 20:44:47 -0400 Subject: [PATCH] config.js: allow root domain of a zone to be updated Fixes #1 --- config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.js b/config.js index 52d25a8..fbe6e6b 100644 --- a/config.js +++ b/config.js @@ -5,7 +5,7 @@ const DOMAINS = require('./domains.json'); exports.getZoneForDomain = (hostname) => { for (let domain in DOMAINS) { - if (hostname.endsWith(`.${domain}`)) { + if (hostname.endsWith(domain)) { return new Zone(DOMAINS[domain].projectId, DOMAINS[domain].zoneName); } } @@ -13,7 +13,7 @@ exports.getZoneForDomain = (hostname) => { exports.getRecordEntry = (hostname) => { for (let domain in DOMAINS) { - if (hostname.endsWith(`.${domain}`)) { + if (hostname.endsWith(domain)) { if (DOMAINS[domain].records.hasOwnProperty(hostname)) { return DOMAINS[domain].records[hostname]; }