docs: change event payload handling in subscribers (#8078)

This commit is contained in:
Shahed Nasser authored and GitHub committed 2024-07-11 13:34:24 +03:00
1 parent 143847ace4
commit 02add3f0f5
8 files changed
+33 -11

No files matched your search

@@ -98,7 +98,7 @@ export default async function productCreateHandler({
const productModuleService: IProductModuleService =
container.resolve(ModuleRegistrationName.PRODUCT)
const productId = "data" in data ? data.data.id : data.id
const productId = data.data.id
const product = await productModuleService.retrieveProduct(
productId
+1 -1
View File
@@ -133,7 +133,7 @@ To execute the workflow, invoke it passing the Medusa container as a parameter.
data,
container,
}: SubscriberArgs<{ id: string }>) {
const userId = "data" in data ? data.data.id : data.id
const userId = data.data.id
const userModuleService: IUserModuleService = container.resolve(
ModuleRegistrationName.USER
)