settings: cloudronId is only ever set
we use subscription API to get the cloudronId, never from database
This commit is contained in:
@@ -34,9 +34,6 @@ exports = module.exports = {
|
||||
getLanguage,
|
||||
setLanguage,
|
||||
|
||||
getCloudronId,
|
||||
setCloudronId,
|
||||
|
||||
getSysinfoConfig,
|
||||
setSysinfoConfig,
|
||||
|
||||
@@ -157,7 +154,6 @@ const gDefaults = (function () {
|
||||
provider: 'noop'
|
||||
};
|
||||
result[exports.LANGUAGE_KEY] = 'en';
|
||||
result[exports.CLOUDRON_ID_KEY] = '';
|
||||
result[exports.BACKUP_CONFIG_KEY] = {
|
||||
provider: 'filesystem',
|
||||
backupFolder: paths.DEFAULT_BACKUP_DIR,
|
||||
@@ -563,19 +559,6 @@ async function setLanguage(language) {
|
||||
notifyChange(exports.LANGUAGE_KEY, language);
|
||||
}
|
||||
|
||||
async function getCloudronId() {
|
||||
const value = await get(exports.CLOUDRON_ID_KEY);
|
||||
if (value === null) return gDefaults[exports.CLOUDRON_ID_KEY];
|
||||
return value;
|
||||
}
|
||||
|
||||
async function setCloudronId(cid) {
|
||||
assert.strictEqual(typeof cid, 'string');
|
||||
|
||||
await set(exports.CLOUDRON_ID_KEY, cid);
|
||||
notifyChange(exports.CLOUDRON_ID_KEY, cid);
|
||||
}
|
||||
|
||||
async function list() {
|
||||
const settings = await database.query(`SELECT ${SETTINGS_FIELDS} FROM settings WHERE value IS NOT NULL ORDER BY name`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user