From 680b8c27d1d076b5f231e1b7401ca2cec6b4aa15 Mon Sep 17 00:00:00 2001 From: Michael Bromley Date: Mon, 28 Jun 2021 12:21:17 +0200 Subject: [PATCH] feat(core): Emit CustomerEvent on creation via Shop API Closes #949 --- packages/core/src/service/services/customer.service.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/core/src/service/services/customer.service.ts b/packages/core/src/service/services/customer.service.ts index 38a148caa3..8cdee176f6 100644 --- a/packages/core/src/service/services/customer.service.ts +++ b/packages/core/src/service/services/customer.service.ts @@ -546,6 +546,7 @@ export class CustomerService { } else { customer = new Customer(input); this.channelService.assignToCurrentChannel(customer, ctx); + this.eventBus.publish(new CustomerEvent(ctx, customer, 'created')); } return this.connection.getRepository(ctx, Customer).save(customer); }