The value for naked domains is the appid and not the location

This means that if we change the constant ADMIN_LOCATION the update
scripts will automatically fix up correctly

Part of #119
This commit is contained in:
Girish Ramakrishnan
2015-02-25 13:20:33 -08:00
parent e0ff349e5a
commit 285cd1a198
2 changed files with 2 additions and 2 deletions
@@ -4,7 +4,7 @@ var type = dbm.dataType;
var constants = require('../constants.js');
exports.up = function(db, callback) {
db.runSql('INSERT settings (name, value) VALUES("naked_domain", ?)', [ constants.ADMIN_LOCATION ], callback);
db.runSql('INSERT settings (name, value) VALUES("naked_domain", ?)', [ constants.ADMIN_APPID ], callback);
};
exports.down = function(db, callback) {
+1 -1
View File
@@ -822,7 +822,7 @@ describe('database', function () {
expect(error).to.be(null);
expect(result).to.be.an(Array);
expect(result.length).to.be(2);
expect(result[0]).to.eql({ name: 'naked_domain', value: constants.ADMIN_LOCATION });
expect(result[0]).to.eql({ name: 'naked_domain', value: constants.ADMIN_APPID });
expect(result[1]).to.eql({ name: 'somekey', value: 'somevalue' });
done();
});