feat: add DISABLE_NOTIFICATIONS_PAGE feature flag

This commit is contained in:
Ali BARIN
2024-02-07 11:47:44 +00:00
parent a26cf932a1
commit 6ec5872391
4 changed files with 42 additions and 35 deletions

View File

@@ -1,6 +1,11 @@
import appConfig from '../../config/app.js';
import { hasValidLicense } from '../../helpers/license.ee.js';
import Config from '../../models/config.js';
const defaultConfig = {
disableNotificationsPage: appConfig.disableNotificationsPage,
};
const getConfig = async (_parent, params) => {
if (!(await hasValidLicense())) return {};
@@ -18,7 +23,7 @@ const getConfig = async (_parent, params) => {
computedConfig[key] = value?.data;
return computedConfig;
}, {});
}, defaultConfig);
};
export default getConfig;