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:
@@ -6,8 +6,8 @@ import {
|
||||
WorkflowResponse,
|
||||
} from "@medusajs/framework/workflows-sdk"
|
||||
import { setAuthAppMetadataStep } from "../../auth"
|
||||
import { createCustomersStep } from "../steps"
|
||||
import { validateCustomerAccountCreation } from "../steps/validate-customer-account-creation"
|
||||
import { createCustomersWorkflow } from "./create-customers"
|
||||
|
||||
export type CreateCustomerAccountWorkflowInput = {
|
||||
authIdentityId: string
|
||||
@@ -32,7 +32,11 @@ export const createCustomerAccountWorkflow = createWorkflow(
|
||||
}
|
||||
})
|
||||
|
||||
const customers = createCustomersStep([customerData])
|
||||
const customers = createCustomersWorkflow.runAsStep({
|
||||
input: {
|
||||
customersData: [customerData],
|
||||
},
|
||||
})
|
||||
|
||||
const customer = transform(
|
||||
customers,
|
||||
|
||||
Reference in New Issue
Block a user