mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
feat: clean api behind a flag (#3288)
This commit is contained in:
parent
785d056a40
commit
898d4f0b70
@ -71,6 +71,7 @@ exports[`should create default config 1`] = `
|
||||
"anonymiseEventLog": false,
|
||||
"bulkOperations": false,
|
||||
"caseInsensitiveInOperators": false,
|
||||
"cleanClientApi": false,
|
||||
"crOnVariants": false,
|
||||
"embedProxy": true,
|
||||
"embedProxyFrontend": true,
|
||||
@ -95,6 +96,7 @@ exports[`should create default config 1`] = `
|
||||
"anonymiseEventLog": false,
|
||||
"bulkOperations": false,
|
||||
"caseInsensitiveInOperators": false,
|
||||
"cleanClientApi": false,
|
||||
"crOnVariants": false,
|
||||
"embedProxy": true,
|
||||
"embedProxyFrontend": true,
|
||||
|
@ -692,33 +692,37 @@ class FeatureToggleService {
|
||||
query,
|
||||
includeIds,
|
||||
);
|
||||
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,
|
||||
}),
|
||||
);
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -72,6 +72,7 @@ const flags = {
|
||||
process.env.PROJECT_SCOPED_SEGMENTS,
|
||||
false,
|
||||
),
|
||||
cleanClientApi: parseEnvVarBoolean(process.env.CLEAN_CLIENT_API, false),
|
||||
};
|
||||
|
||||
export const defaultExperimentalOptions: IExperimentalOptions = {
|
||||
|
Loading…
Reference in New Issue
Block a user