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:
@@ -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[],
|
||||||
|
|||||||
Reference in New Issue
Block a user