Skip to content

Commit

Permalink
fix(core-flows): use customer create workflow to reuse the emit event (
Browse files Browse the repository at this point in the history
…medusajs#10601)

what:

- uses the create customer workflow instead to reuse the event emit.

RESOLVES CMRC-792
  • Loading branch information
riqwan authored Dec 13, 2024
1 parent 729eb5d commit 429c570
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -32,7 +32,11 @@ export const createCustomerAccountWorkflow = createWorkflow(
}
})

const customers = createCustomersStep([customerData])
const customers = createCustomersWorkflow.runAsStep({
input: {
customersData: [customerData],
},
})

const customer = transform(
customers,
Expand Down

0 comments on commit 429c570

Please sign in to comment.