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,
|
"anonymiseEventLog": false,
|
||||||
"bulkOperations": false,
|
"bulkOperations": false,
|
||||||
"caseInsensitiveInOperators": false,
|
"caseInsensitiveInOperators": false,
|
||||||
|
"cleanClientApi": false,
|
||||||
"crOnVariants": false,
|
"crOnVariants": false,
|
||||||
"embedProxy": true,
|
"embedProxy": true,
|
||||||
"embedProxyFrontend": true,
|
"embedProxyFrontend": true,
|
||||||
@ -95,6 +96,7 @@ exports[`should create default config 1`] = `
|
|||||||
"anonymiseEventLog": false,
|
"anonymiseEventLog": false,
|
||||||
"bulkOperations": false,
|
"bulkOperations": false,
|
||||||
"caseInsensitiveInOperators": false,
|
"caseInsensitiveInOperators": false,
|
||||||
|
"cleanClientApi": false,
|
||||||
"crOnVariants": false,
|
"crOnVariants": false,
|
||||||
"embedProxy": true,
|
"embedProxy": true,
|
||||||
"embedProxyFrontend": true,
|
"embedProxyFrontend": true,
|
||||||
|
@ -692,33 +692,37 @@ class FeatureToggleService {
|
|||||||
query,
|
query,
|
||||||
includeIds,
|
includeIds,
|
||||||
);
|
);
|
||||||
return result.map(
|
if (this.flagResolver.isEnabled('cleanClientApi')) {
|
||||||
({
|
return result.map(
|
||||||
name,
|
({
|
||||||
type,
|
name,
|
||||||
enabled,
|
type,
|
||||||
project,
|
enabled,
|
||||||
stale,
|
project,
|
||||||
strategies,
|
stale,
|
||||||
variants,
|
strategies,
|
||||||
description,
|
variants,
|
||||||
createdAt,
|
description,
|
||||||
lastSeenAt,
|
createdAt,
|
||||||
impressionData,
|
lastSeenAt,
|
||||||
}) => ({
|
impressionData,
|
||||||
name,
|
}) => ({
|
||||||
type,
|
name,
|
||||||
enabled,
|
type,
|
||||||
project,
|
enabled,
|
||||||
stale,
|
project,
|
||||||
strategies,
|
stale,
|
||||||
variants,
|
strategies,
|
||||||
description,
|
variants,
|
||||||
createdAt,
|
description,
|
||||||
lastSeenAt,
|
createdAt,
|
||||||
impressionData,
|
lastSeenAt,
|
||||||
}),
|
impressionData,
|
||||||
);
|
}),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -72,6 +72,7 @@ const flags = {
|
|||||||
process.env.PROJECT_SCOPED_SEGMENTS,
|
process.env.PROJECT_SCOPED_SEGMENTS,
|
||||||
false,
|
false,
|
||||||
),
|
),
|
||||||
|
cleanClientApi: parseEnvVarBoolean(process.env.CLEAN_CLIENT_API, false),
|
||||||
};
|
};
|
||||||
|
|
||||||
export const defaultExperimentalOptions: IExperimentalOptions = {
|
export const defaultExperimentalOptions: IExperimentalOptions = {
|
||||||
|
Loading…
Reference in New Issue
Block a user