From 9767e1f5916fb59596abc41acd3281f51fa9e188 Mon Sep 17 00:00:00 2001 From: Naz Date: Tue, 27 Jun 2023 12:40:53 +0700 Subject: [PATCH] Fixed PostEditedEvent data mapping refs https://github.com/TryGhost/Team/issues/3169 - The "current" part of the payload should always have the "id" included to make the data structure easier to use for the event consumer --- .../server/services/collections/model-to-domain-events-bridge.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ghost/core/core/server/services/collections/model-to-domain-events-bridge.js b/ghost/core/core/server/services/collections/model-to-domain-events-bridge.js index 4f73b269b9..4eadfc5a49 100644 --- a/ghost/core/core/server/services/collections/model-to-domain-events-bridge.js +++ b/ghost/core/core/server/services/collections/model-to-domain-events-bridge.js @@ -26,6 +26,7 @@ const domainEventDispatcher = (modelEventName, data) => { event = PostEditedEvent.create({ id: data.id, current: { + id: data.id, title: data.attributes.title, status: data.attributes.status, featured: data.attributes.featured,