diff --git a/src/lib/db/feature-toggle-client-store.ts b/src/lib/db/feature-toggle-client-store.ts index 3a70625d89..97c4c8e52c 100644 --- a/src/lib/db/feature-toggle-client-store.ts +++ b/src/lib/db/feature-toggle-client-store.ts @@ -198,7 +198,6 @@ export default class FeatureToggleClientStore feature.impressionData = r.impression_data; feature.enabled = !!r.enabled; feature.name = r.name; - feature.favorite = r.favorite; feature.description = r.description; feature.project = r.project; feature.stale = r.stale; @@ -206,6 +205,7 @@ export default class FeatureToggleClientStore feature.variants = r.variants || []; feature.project = r.project; if (isAdmin) { + feature.favorite = r.favorite; feature.lastSeenAt = r.last_seen_at; feature.createdAt = r.created_at; } diff --git a/src/test/e2e/api/client/feature.e2e.test.ts b/src/test/e2e/api/client/feature.e2e.test.ts index 69dd13290d..5999aed418 100644 --- a/src/test/e2e/api/client/feature.e2e.test.ts +++ b/src/test/e2e/api/client/feature.e2e.test.ts @@ -1,4 +1,7 @@ -import { IUnleashTest, setupApp } from '../../helpers/test-helper'; +import { + IUnleashTest, + setupAppWithCustomConfig, +} from '../../helpers/test-helper'; import dbInit, { ITestDb } from '../../helpers/database-init'; import getLogger from '../../../fixtures/no-logger'; import { DEFAULT_ENV } from '../../../../lib/util/constants'; @@ -8,7 +11,13 @@ let db: ITestDb; beforeAll(async () => { db = await dbInit('feature_api_client', getLogger); - app = await setupApp(db.stores); + app = await setupAppWithCustomConfig(db.stores, { + experimental: { + flags: { + strictSchemaValidation: true, + }, + }, + }); await app.services.featureToggleServiceV2.createFeatureToggle( 'default', {