Total Complexity | 1 |
Complexity/F | 1 |
Lines of Code | 14 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { Injectable } from '@nestjs/common'; |
||
2 | import { EventBus } from '@nestjs/cqrs'; |
||
3 | import { IEventBus } from 'src/Application/IEventBus'; |
||
4 | import { IEvent } from 'src/Application/IEvent'; |
||
5 | |||
6 | @Injectable() |
||
7 | export class EventBusAdapter implements IEventBus { |
||
8 | constructor(private readonly eventBus: EventBus) {} |
||
9 | |||
10 | public publish(event: IEvent): void { |
||
11 | this.eventBus.publish(event); |
||
12 | } |
||
13 | } |
||
14 |