diff --git a/changelog/10684.txt b/changelog/10684.txt new file mode 100644 index 000000000..3798d2e92 --- /dev/null +++ b/changelog/10684.txt @@ -0,0 +1,3 @@ +```release-note:bug +ui: Fix expected response from feature-flags endpoint +``` diff --git a/ui/app/routes/application.js b/ui/app/routes/application.js index 7c36d1c54..29aca1bee 100644 --- a/ui/app/routes/application.js +++ b/ui/app/routes/application.js @@ -89,7 +89,7 @@ export default Route.extend({ }); if (result.status === 200) { const body = await result.json(); - const flags = body.data?.feature_flags || []; + const flags = body.feature_flags || []; this.featureFlagService.setFeatureFlags(flags); } }, diff --git a/ui/tests/acceptance/managed-namespace-test.js b/ui/tests/acceptance/managed-namespace-test.js index 0437c8dc8..894d6d1ab 100644 --- a/ui/tests/acceptance/managed-namespace-test.js +++ b/ui/tests/acceptance/managed-namespace-test.js @@ -4,9 +4,7 @@ import { setupApplicationTest } from 'ember-qunit'; import Pretender from 'pretender'; const FEATURE_FLAGS_RESPONSE = { - data: { - feature_flags: ['VAULT_CLOUD_ADMIN_NAMESPACE'], - }, + feature_flags: ['VAULT_CLOUD_ADMIN_NAMESPACE'], }; module('Acceptance | Enterprise | Managed namespace root', function(hooks) {