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

fix: context updated event now does stores correct fields (#5705)

This commit is contained in:
Jaanus Sellin 2023-12-20 15:57:17 +02:00 committed by GitHub
parent f3ca4f0c54
commit 8e7e389d1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -140,11 +140,13 @@ class ContextService {
// update
await this.contextFieldStore.update(value);
const { createdAt, sortOrder, ...previousContextField } = contextField;
await this.eventService.storeEvent({
type: CONTEXT_FIELD_UPDATED,
createdBy: userName,
createdByUserId: updatedByUserId,
preData: contextField,
preData: previousContextField,
data: value,
});
}