mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-11-04 04:28:08 +00:00 
			
		
		
		
	UI: Fix shape of response anticipated from feature-flags endpoint (#10684)
* Fix shape of response anticipated from feature-flags endpoint * Add changelog
This commit is contained in:
		
							
								
								
									
										3
									
								
								changelog/10684.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								changelog/10684.txt
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					```release-note:bug
 | 
				
			||||||
 | 
					ui: Fix expected response from feature-flags endpoint
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
@@ -89,7 +89,7 @@ export default Route.extend({
 | 
				
			|||||||
    });
 | 
					    });
 | 
				
			||||||
    if (result.status === 200) {
 | 
					    if (result.status === 200) {
 | 
				
			||||||
      const body = await result.json();
 | 
					      const body = await result.json();
 | 
				
			||||||
      const flags = body.data?.feature_flags || [];
 | 
					      const flags = body.feature_flags || [];
 | 
				
			||||||
      this.featureFlagService.setFeatureFlags(flags);
 | 
					      this.featureFlagService.setFeatureFlags(flags);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,9 +4,7 @@ import { setupApplicationTest } from 'ember-qunit';
 | 
				
			|||||||
import Pretender from 'pretender';
 | 
					import Pretender from 'pretender';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const FEATURE_FLAGS_RESPONSE = {
 | 
					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) {
 | 
					module('Acceptance | Enterprise | Managed namespace root', function(hooks) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user