1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-20 00:08:02 +01:00

feat: do not return disabled features to FE api (#6520)

This commit is contained in:
Jaanus Sellin 2024-03-12 14:41:25 +02:00 committed by GitHub
parent ca329da4b4
commit a08bada1de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -84,7 +84,8 @@ export default class ClientFeatureToggleReadModel
`fs.id`, `fs.id`,
) )
.leftJoin('segments', `segments.id`, `fss.segment_id`) .leftJoin('segments', `segments.id`, `fss.segment_id`)
.leftJoin('dependent_features as df', 'df.child', 'features.name'); .leftJoin('dependent_features as df', 'df.child', 'features.name')
.where('fe.enabled', true);
query = query.select(selectColumns); query = query.select(selectColumns);
const rows = await query; const rows = await query;

View File

@ -110,7 +110,6 @@ export class GlobalFrontendApiCache extends EventEmitter {
} }
// TODO: fetch only relevant projects/environments based on tokens // TODO: fetch only relevant projects/environments based on tokens
// TODO: also consider not fetching disabled features, because those are not returned by frontend API
private async refreshData() { private async refreshData() {
try { try {
const stopTimer = this.timer('refreshData'); const stopTimer = this.timer('refreshData');