Skip to content

Commit

Permalink
feat(api): add new feature toggles in /api/feature-toggles
Browse files Browse the repository at this point in the history
  • Loading branch information
bpetetot committed Jan 16, 2025
1 parent 70a3300 commit d81d139
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { config } from '../../../../src/shared/config.js';
import * as network from '../../../identity-access-management/infrastructure/utils/network.js';
import { featureToggles } from '../../infrastructure/feature-toggles/index.js';
import * as serializer from '../../infrastructure/serializers/jsonapi/feature-toggle-serializer.js';

const getActiveFeatures = function () {
return serializer.serialize(config.featureToggles);
const getActiveFeatures = async function () {
const legacyFeatureToggles = config.featureToggles;

const newFeatureToggles = await featureToggles.withTag('frontend');

return serializer.serialize({ ...legacyFeatureToggles, ...newFeatureToggles });
};

// TODO: Test route to be removed soon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ describe('Acceptance | Shared | Application | Controller | feature-toggle', func
'is-self-account-deletion-enabled': false,
'is-text-to-speech-button-enabled': false,
'is-legal-documents-versioning-enabled': false,
'new-feature-toggle-system': false,
'setup-ecosystem-before-start': false,
'show-experimental-missions': false,
'show-new-campaign-presentation-page': false,
Expand Down

0 comments on commit d81d139

Please sign in to comment.