diff --git a/src/config.js b/src/config.js index 18bdc5275..b71659f9e 100644 --- a/src/config.js +++ b/src/config.js @@ -143,6 +143,7 @@ function set(key, value) { } else { data = safe.set(data, key, value); } + saveSync(); } @@ -161,7 +162,7 @@ function webServerOrigin() { } function setFqdn(fqdn) { - set('fqdn', fqdn); + set('adminDomain', fqdn); } function fqdn() { diff --git a/src/test/config-test.js b/src/test/config-test.js index 19842de2e..0b7b76a70 100644 --- a/src/test/config-test.js +++ b/src/test/config-test.js @@ -33,7 +33,6 @@ describe('config', function () { it('did set default values', function () { expect(config.fqdn()).to.equal(''); expect(config.adminFqdn()).to.equal(''); - expect(config.zoneName()).to.equal(''); expect(config.adminLocation()).to.equal('my'); }); @@ -56,7 +55,7 @@ describe('config', function () { }); it('set - object', function (done) { - config.set( { fqdn: 'something.com' } ); + config.set( { adminDomain: 'something.com' } ); expect(config.fqdn()).to.eql('something.com'); done(); }); @@ -68,7 +67,6 @@ describe('config', function () { expect(config.fqdn()).to.equal('example.com'); expect(config.adminFqdn()).to.equal('my.example.com'); expect(config.adminOrigin()).to.equal('https://my.example.com'); - expect(config.zoneName()).to.equal('example.com'); }); it('uses hyphen locations with non-custom domain', function () { @@ -78,7 +76,6 @@ describe('config', function () { expect(config.fqdn()).to.equal('test.example.com'); expect(config.adminLocation()).to.equal('my'); expect(config.adminOrigin()).to.equal('https://my-test.example.com'); - expect(config.zoneName()).to.equal('example.com'); }); it('can set arbitrary values', function (done) {