fix(core-flows): use customer create workflow to reuse the emit event (#10601)
what: - uses the create customer workflow instead to reuse the event emit. RESOLVES CMRC-792
This commit is contained in:
1 parent
729eb5da7b
commit
429c57095b
1 file changed
+6
-2
@@ -6,8 +6,8 @@ import {
|
|||||||
WorkflowResponse,
|
WorkflowResponse,
|
||||||
} from "@medusajs/framework/workflows-sdk"
|
} from "@medusajs/framework/workflows-sdk"
|
||||||
import { setAuthAppMetadataStep } from "../../auth"
|
import { setAuthAppMetadataStep } from "../../auth"
|
||||||
import { createCustomersStep } from "../steps"
|
|
||||||
import { validateCustomerAccountCreation } from "../steps/validate-customer-account-creation"
|
import { validateCustomerAccountCreation } from "../steps/validate-customer-account-creation"
|
||||||
|
import { createCustomersWorkflow } from "./create-customers"
|
||||||
|
|
||||||
export type CreateCustomerAccountWorkflowInput = {
|
export type CreateCustomerAccountWorkflowInput = {
|
||||||
authIdentityId: string
|
authIdentityId: string
|
||||||
@@ -32,7 +32,11 @@ export const createCustomerAccountWorkflow = createWorkflow(
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const customers = createCustomersStep([customerData])
|
const customers = createCustomersWorkflow.runAsStep({
|
||||||
|
input: {
|
||||||
|
customersData: [customerData],
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
const customer = transform(
|
const customer = transform(
|
||||||
customers,
|
customers,
|
||||||
|
|||||||
Reference in new issue
Block a user