From 1f3577428f7884d2525cf6033920d5c217a65284 Mon Sep 17 00:00:00 2001 From: Riqwan Thamir Date: Fri, 13 Dec 2024 14:20:09 +0100 Subject: [PATCH] fix(core-flows): use customer create workflow to reuse the emit event --- .../src/customer/workflows/create-customer-account.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/core/core-flows/src/customer/workflows/create-customer-account.ts b/packages/core/core-flows/src/customer/workflows/create-customer-account.ts index 8e042f5adb305..4996f6bc69d26 100644 --- a/packages/core/core-flows/src/customer/workflows/create-customer-account.ts +++ b/packages/core/core-flows/src/customer/workflows/create-customer-account.ts @@ -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,