From d0bad11661cb93756891e7fafe729b7f4e415fb1 Mon Sep 17 00:00:00 2001 From: Vijay Raghavan Aravamudhan Date: Wed, 1 Sep 2021 09:29:49 +0530 Subject: Fix issue with workspace feature - fixes #1682 (#1854) * fix issue with workspace feature not being turned on, and then randomly turning on somehow. * when deleting the active workspace, auto-select the default workspace. * consolidated the toggling of features into a single place in the config file. Co-authored-by: Sadetdin EYILI Signed-off-by: Vijay A --- .../app/Controllers/Http/StaticController.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'src/internal-server/app/Controllers/Http/StaticController.js') diff --git a/src/internal-server/app/Controllers/Http/StaticController.js b/src/internal-server/app/Controllers/Http/StaticController.js index b9a145061..28c5389a9 100644 --- a/src/internal-server/app/Controllers/Http/StaticController.js +++ b/src/internal-server/app/Controllers/Http/StaticController.js @@ -2,21 +2,15 @@ * Controller for routes with static responses */ +import { DEFAULT_FEATURES_CONFIG } from '../../../../config'; + +// TODO: This endpoint and associated code needs to be remoeved as cleanup class StaticController { // Enable all features features({ response, }) { - return response.send({ - isServiceProxyEnabled: true, - isWorkspaceEnabled: true, - isAnnouncementsEnabled: true, - isSettingsWSEnabled: false, - isMagicBarEnabled: true, - isTodosEnabled: true, - subscribeURL: 'https://getferdi.com', - hasInlineCheckout: true, - }); + return response.send(DEFAULT_FEATURES_CONFIG); } // Return an empty array @@ -34,4 +28,4 @@ class StaticController { } } -module.exports = StaticController; +export default StaticController; -- cgit v1.2.3-70-g09d2