From efdbda68e43a1bc46e1a624716fcb23183679551 Mon Sep 17 00:00:00 2001 From: Christopher Kolstad Date: Wed, 29 Sep 2021 12:57:58 +0200 Subject: [PATCH] fix: reduce data in FEATURE_ENVIRONMENT events --- src/lib/addons/slack.ts | 4 ++-- src/lib/services/feature-toggle-service-v2.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/addons/slack.ts b/src/lib/addons/slack.ts index 24c5bc1061..33007294ed 100644 --- a/src/lib/addons/slack.ts +++ b/src/lib/addons/slack.ts @@ -4,14 +4,14 @@ import Addon from './addon'; import slackDefinition from './slack-definition'; import { IAddonConfig, IEvent } from '../types/model'; -const { +import { FEATURE_CREATED, FEATURE_UPDATED, FEATURE_ARCHIVED, FEATURE_REVIVED, FEATURE_STALE_ON, FEATURE_STALE_OFF, -} = require('../types/events'); +} from '../types/events'; export default class SlackAddon extends Addon { unleashUrl: string; diff --git a/src/lib/services/feature-toggle-service-v2.ts b/src/lib/services/feature-toggle-service-v2.ts index a66bcdccb4..3853b4f555 100644 --- a/src/lib/services/feature-toggle-service-v2.ts +++ b/src/lib/services/feature-toggle-service-v2.ts @@ -576,7 +576,7 @@ class FeatureToggleServiceV2 { ? FEATURE_ENVIRONMENT_ENABLED : FEATURE_ENVIRONMENT_DISABLED, createdBy: userName, - data, + data: { name: featureName }, tags, project: projectId, environment,