Переглянути джерело

fix(core): Publish event when deleting FacetValue

Michael Bromley 3 роки тому
батько
коміт
0ece03b994

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

@@ -151,6 +151,7 @@ export class FacetValueService {
         if (!isInUse) {
         if (!isInUse) {
             const facetValue = await this.connection.getEntityOrThrow(ctx, FacetValue, id);
             const facetValue = await this.connection.getEntityOrThrow(ctx, FacetValue, id);
             await this.connection.getRepository(ctx, FacetValue).remove(facetValue);
             await this.connection.getRepository(ctx, FacetValue).remove(facetValue);
+            this.eventBus.publish(new FacetValueEvent(ctx, facetValue, 'deleted', id));
             result = DeletionResult.DELETED;
             result = DeletionResult.DELETED;
         } else if (force) {
         } else if (force) {
             const facetValue = await this.connection.getEntityOrThrow(ctx, FacetValue, id);
             const facetValue = await this.connection.getEntityOrThrow(ctx, FacetValue, id);