settings: remove appstore listing config

this is not used anymore
This commit is contained in:
Girish Ramakrishnan
2023-08-02 20:18:00 +05:30
parent be4c3575fb
commit 85a73af303
4 changed files with 2 additions and 147 deletions
-23
View File
@@ -52,9 +52,6 @@ exports = module.exports = {
getProfileConfig,
setProfileConfig,
getAppstoreListingConfig,
setAppstoreListingConfig,
getGhosts,
setGhosts,
@@ -97,7 +94,6 @@ exports = module.exports = {
DIRECTORY_SERVER_KEY: 'user_directory_config',
REGISTRY_CONFIG_KEY: 'registry_config',
SYSINFO_CONFIG_KEY: 'sysinfo_config', // misnomer: ipv4 config
APPSTORE_LISTING_CONFIG_KEY: 'appstore_listing_config',
SUPPORT_CONFIG_KEY: 'support_config',
PROFILE_CONFIG_KEY: 'profile_config',
GHOSTS_CONFIG_KEY: 'ghosts_config',
@@ -213,11 +209,6 @@ const gDefaults = (function () {
result[exports.CONSOLE_SERVER_ORIGIN_KEY] = 'https://console.cloudron.io';
result[exports.DEMO_KEY] = false;
result[exports.APPSTORE_LISTING_CONFIG_KEY] = {
blacklist: [],
whitelist: null // null imples nothing is whitelisted. this is an array
};
result[exports.GHOSTS_CONFIG_KEY] = {};
result[exports.SUPPORT_CONFIG_KEY] = {
@@ -582,20 +573,6 @@ async function setProfileConfig(directoryConfig) {
notifyChange(exports.PROFILE_CONFIG_KEY, directoryConfig);
}
async function getAppstoreListingConfig() {
const value = await get(exports.APPSTORE_LISTING_CONFIG_KEY);
if (value === null) return gDefaults[exports.APPSTORE_LISTING_CONFIG_KEY];
return JSON.parse(value);
}
async function setAppstoreListingConfig(listingConfig) {
assert.strictEqual(typeof listingConfig, 'object');
await set(exports.APPSTORE_LISTING_CONFIG_KEY, JSON.stringify(listingConfig));
notifyChange(exports.APPSTORE_LISTING_CONFIG_KEY, listingConfig);
}
async function getGhosts() {
const value = await get(exports.GHOSTS_CONFIG_KEY);
if (value === null) return gDefaults[exports.GHOSTS_CONFIG_KEY];