1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

fix: should use stripped update data for featureToggle

This commit is contained in:
Ivar Conradi Østhus 2020-10-01 22:34:28 +02:00
parent 0121a0e207
commit 192c292ecf

View File

@ -90,6 +90,7 @@ class FeatureController extends Controller {
try {
await this.validateUniqueName(toggleName);
const value = await featureShema.validateAsync(req.body);
await this.eventStore.store({
type: FEATURE_CREATED,
createdBy: userName,
@ -110,11 +111,11 @@ class FeatureController extends Controller {
try {
await this.featureToggleStore.getFeature(featureName);
await featureShema.validateAsync(updatedFeature);
const value = await featureShema.validateAsync(updatedFeature);
await this.eventStore.store({
type: FEATURE_UPDATED,
createdBy: userName,
data: updatedFeature,
data: value,
});
res.status(200).end();
} catch (error) {