fix(): missing events (#13465)

**What**
Add missing create event for sales channel and fix link module to properly emit detached event with the correct data shape
This commit is contained in:
Adrien de Peretti
2025-09-10 15:41:20 +00:00
committed by GitHub
parent e8822f3e69
commit 8e849074e4
3 changed files with 8 additions and 2 deletions
+6
View File
@@ -0,0 +1,6 @@
---
"@medusajs/link-modules": patch
"@medusajs/sales-channel": patch
---
fix(): missing events
@@ -252,7 +252,7 @@ export default class LinkModuleService implements ILinkModule {
source: this.serviceName_, source: this.serviceName_,
eventName: this.entityName_ + "." + CommonEvents.DETACHED, eventName: this.entityName_ + "." + CommonEvents.DETACHED,
})({ })({
data: links.map((link) => link.id), data: links.map((link) => ({ id: link.id })),
sharedContext, sharedContext,
}) })
@@ -68,7 +68,7 @@ export default class SalesChannelModuleService
): Promise<SalesChannelDTO> ): Promise<SalesChannelDTO>
@InjectManager() @InjectManager()
@EmitEvents()
// @ts-expect-error // @ts-expect-error
async createSalesChannels( async createSalesChannels(
data: CreateSalesChannelDTO | CreateSalesChannelDTO[], data: CreateSalesChannelDTO | CreateSalesChannelDTO[],