settings: remove licenseKey

this is unused
This commit is contained in:
Girish Ramakrishnan
2022-03-31 12:31:35 -07:00
parent c4689a8385
commit 3295d2b727
4 changed files with 13 additions and 25 deletions

View File

@@ -40,9 +40,6 @@ exports = module.exports = {
getRegistryConfig,
setRegistryConfig,
getLicenseKey,
setLicenseKey,
getLanguage,
setLanguage,
@@ -113,7 +110,6 @@ exports = module.exports = {
AUTOUPDATE_PATTERN_KEY: 'autoupdate_pattern',
TIME_ZONE_KEY: 'time_zone',
CLOUDRON_NAME_KEY: 'cloudron_name',
LICENSE_KEY: 'license_key',
LANGUAGE_KEY: 'language',
CLOUDRON_ID_KEY: 'cloudron_id',
CLOUDRON_TOKEN_KEY: 'cloudron_token', // apstore token
@@ -172,7 +168,6 @@ const gDefaults = (function () {
provider: 'noop'
};
result[exports.UNSTABLE_APPS_KEY] = true;
result[exports.LICENSE_KEY] = '';
result[exports.LANGUAGE_KEY] = 'en';
result[exports.CLOUDRON_ID_KEY] = '';
result[exports.CLOUDRON_TOKEN_KEY] = '';
@@ -670,19 +665,6 @@ async function getSupportConfig() {
return JSON.parse(value);
}
async function getLicenseKey() {
const value = get(exports.LICENSE_KEY);
if (value === null) return gDefaults[exports.LICENSE_KEY];
return value;
}
async function setLicenseKey(licenseKey) {
assert.strictEqual(typeof licenseKey, 'string');
await set(exports.LICENSE_KEY, licenseKey);
notifyChange(exports.LICENSE_KEY, licenseKey);
}
async function getLanguage() {
const value = await get(exports.LANGUAGE_KEY);
if (value === null) return gDefaults[exports.LANGUAGE_KEY];