Skip to content

Commit

Permalink
fix(server): Publish OrderEvent when order is deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Apr 22, 2024
1 parent 9c1cb16 commit 55f6878
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/core/src/service/services/order.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,9 @@ export class OrderService {
.getRepository(ctx, Session)
.update(sessions.map(s => s.id) as string[], { activeOrder: null });
}
const deletedOrder = new Order(orderToDelete);
await this.connection.getRepository(ctx, Order).delete(orderToDelete.id);
await this.eventBus.publish(new OrderEvent(ctx, deletedOrder, 'deleted'));
}

/**
Expand Down

0 comments on commit 55f6878

Please sign in to comment.