Pārlūkot izejas kodu

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

Closes #949
Michael Bromley 4 gadi atpakaļ
vecāks
revīzija
680b8c27d1

+ 1 - 0
packages/core/src/service/services/customer.service.ts

@@ -546,6 +546,7 @@ export class CustomerService {
         } else {
         } else {
             customer = new Customer(input);
             customer = new Customer(input);
             this.channelService.assignToCurrentChannel(customer, ctx);
             this.channelService.assignToCurrentChannel(customer, ctx);
+            this.eventBus.publish(new CustomerEvent(ctx, customer, 'created'));
         }
         }
         return this.connection.getRepository(ctx, Customer).save(customer);
         return this.connection.getRepository(ctx, Customer).save(customer);
     }
     }