mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-09 00:18:00 +01:00
fix: add segment to strategy payload (#3611)
This commit is contained in:
parent
8fdb152ec5
commit
e538cb8a7f
@ -114,9 +114,9 @@ export const FeatureStrategyCreate = () => {
|
|||||||
refetchChangeRequests();
|
refetchChangeRequests();
|
||||||
};
|
};
|
||||||
|
|
||||||
const onSubmit = async () => {
|
const payload = createStrategyPayload(strategy, segments);
|
||||||
const payload = createStrategyPayload(strategy, segments);
|
|
||||||
|
|
||||||
|
const onSubmit = async () => {
|
||||||
trackEvent('strategyTitle', {
|
trackEvent('strategyTitle', {
|
||||||
props: {
|
props: {
|
||||||
hasTitle: Boolean(strategy.title),
|
hasTitle: Boolean(strategy.title),
|
||||||
@ -153,7 +153,7 @@ export const FeatureStrategyCreate = () => {
|
|||||||
projectId,
|
projectId,
|
||||||
featureId,
|
featureId,
|
||||||
environmentId,
|
environmentId,
|
||||||
strategy,
|
payload,
|
||||||
unleashUrl
|
unleashUrl
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -94,6 +94,9 @@ export const FeatureStrategyEdit = () => {
|
|||||||
savedStrategySegments && setSegments(savedStrategySegments);
|
savedStrategySegments && setSegments(savedStrategySegments);
|
||||||
}, [JSON.stringify(savedStrategySegments)]);
|
}, [JSON.stringify(savedStrategySegments)]);
|
||||||
|
|
||||||
|
const segmentsToSubmit = uiConfig?.flags.SE ? segments : [];
|
||||||
|
const payload = createStrategyPayload(strategy, segmentsToSubmit);
|
||||||
|
|
||||||
const onStrategyEdit = async (payload: IFeatureStrategyPayload) => {
|
const onStrategyEdit = async (payload: IFeatureStrategyPayload) => {
|
||||||
await updateStrategyOnFeature(
|
await updateStrategyOnFeature(
|
||||||
projectId,
|
projectId,
|
||||||
@ -134,9 +137,6 @@ export const FeatureStrategyEdit = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const onSubmit = async () => {
|
const onSubmit = async () => {
|
||||||
const segmentsToSubmit = uiConfig?.flags.SE ? segments : [];
|
|
||||||
const payload = createStrategyPayload(strategy, segmentsToSubmit);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (isChangeRequestConfigured(environmentId)) {
|
if (isChangeRequestConfigured(environmentId)) {
|
||||||
await onStrategyRequestEdit(payload);
|
await onStrategyRequestEdit(payload);
|
||||||
@ -168,7 +168,7 @@ export const FeatureStrategyEdit = () => {
|
|||||||
projectId,
|
projectId,
|
||||||
featureId,
|
featureId,
|
||||||
environmentId,
|
environmentId,
|
||||||
strategy,
|
payload,
|
||||||
strategyDefinition,
|
strategyDefinition,
|
||||||
unleashUrl
|
unleashUrl
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user