Browse Source

feat(core): Emit CustomerEvent on creation via Shop API

Closes #949
Michael Bromley 4 years ago
parent
commit
680b8c27d1
1 changed files with 1 additions and 0 deletions
  1. 1 0
      packages/core/src/service/services/customer.service.ts

+ 1 - 0
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);
     }