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:
Riqwan Thamir
2024-12-13 15:40:46 +01:00
committed by GitHub
parent 729eb5da7b
commit 429c57095b

View File

@@ -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,