Skip to content

Commit

Permalink
chore: clean client api flag removed (#4368)
Browse files Browse the repository at this point in the history
  • Loading branch information
kwasniew committed Jul 31, 2023
1 parent b34f00c commit ce468dc
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 35 deletions.
2 changes: 0 additions & 2 deletions src/lib/__snapshots__/create-config.test.ts.snap
Expand Up @@ -69,7 +69,6 @@ exports[`should create default config 1`] = `
"flags": {
"anonymiseEventLog": false,
"caseInsensitiveInOperators": false,
"cleanClientApi": false,
"configurableFeatureTypeLifetimes": false,
"customRootRoles": false,
"demo": false,
Expand Down Expand Up @@ -104,7 +103,6 @@ exports[`should create default config 1`] = `
"experiments": {
"anonymiseEventLog": false,
"caseInsensitiveInOperators": false,
"cleanClientApi": false,
"configurableFeatureTypeLifetimes": false,
"customRootRoles": false,
"demo": false,
Expand Down
54 changes: 23 additions & 31 deletions src/lib/services/feature-toggle-service.ts
Expand Up @@ -940,37 +940,29 @@ class FeatureToggleService {
const result = await this.featureToggleClientStore.getClient(
query || {},
);
if (this.flagResolver.isEnabled('cleanClientApi')) {
return result.map(
({
name,
type,
enabled,
project,
stale,
strategies,
variants,
description,
createdAt,
lastSeenAt,
impressionData,
}) => ({
name,
type,
enabled,
project,
stale,
strategies,
variants,
description,
createdAt,
lastSeenAt,
impressionData,
}),
);
} else {
return result;
}
return result.map(
({
name,
type,
enabled,
project,
stale,
strategies,
variants,
description,
impressionData,
}) => ({
name,
type,
enabled,
project,
stale,
strategies,
variants,
description,
impressionData,
}),
);
}

async getPlaygroundFeatures(
Expand Down
2 changes: 0 additions & 2 deletions src/lib/types/experimental.ts
Expand Up @@ -14,7 +14,6 @@ export type IFlagKey =
| 'strictSchemaValidation'
| 'proPlanAutoCharge'
| 'personalAccessTokensKillSwitch'
| 'cleanClientApi'
| 'migrationLock'
| 'demo'
| 'googleAuthEnabled'
Expand Down Expand Up @@ -81,7 +80,6 @@ const flags: IFlags = {
process.env.UNLEASH_PAT_KILL_SWITCH,
false,
),
cleanClientApi: parseEnvVarBoolean(process.env.CLEAN_CLIENT_API, false),
migrationLock: parseEnvVarBoolean(process.env.MIGRATION_LOCK, false),
demo: parseEnvVarBoolean(process.env.UNLEASH_DEMO, false),
googleAuthEnabled: parseEnvVarBoolean(
Expand Down

0 comments on commit ce468dc

Please sign in to comment.