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();
|
||||
};
|
||||
|
||||
const onSubmit = async () => {
|
||||
const payload = createStrategyPayload(strategy, segments);
|
||||
const payload = createStrategyPayload(strategy, segments);
|
||||
|
||||
const onSubmit = async () => {
|
||||
trackEvent('strategyTitle', {
|
||||
props: {
|
||||
hasTitle: Boolean(strategy.title),
|
||||
@ -153,7 +153,7 @@ export const FeatureStrategyCreate = () => {
|
||||
projectId,
|
||||
featureId,
|
||||
environmentId,
|
||||
strategy,
|
||||
payload,
|
||||
unleashUrl
|
||||
)
|
||||
}
|
||||
|
@ -94,6 +94,9 @@ export const FeatureStrategyEdit = () => {
|
||||
savedStrategySegments && setSegments(savedStrategySegments);
|
||||
}, [JSON.stringify(savedStrategySegments)]);
|
||||
|
||||
const segmentsToSubmit = uiConfig?.flags.SE ? segments : [];
|
||||
const payload = createStrategyPayload(strategy, segmentsToSubmit);
|
||||
|
||||
const onStrategyEdit = async (payload: IFeatureStrategyPayload) => {
|
||||
await updateStrategyOnFeature(
|
||||
projectId,
|
||||
@ -134,9 +137,6 @@ export const FeatureStrategyEdit = () => {
|
||||
};
|
||||
|
||||
const onSubmit = async () => {
|
||||
const segmentsToSubmit = uiConfig?.flags.SE ? segments : [];
|
||||
const payload = createStrategyPayload(strategy, segmentsToSubmit);
|
||||
|
||||
try {
|
||||
if (isChangeRequestConfigured(environmentId)) {
|
||||
await onStrategyRequestEdit(payload);
|
||||
@ -168,7 +168,7 @@ export const FeatureStrategyEdit = () => {
|
||||
projectId,
|
||||
featureId,
|
||||
environmentId,
|
||||
strategy,
|
||||
payload,
|
||||
strategyDefinition,
|
||||
unleashUrl
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user