Files
edr-platform/apps/edr-payment-api/src/modules/outbox/outbox.module.ts
2026-06-11 15:25:24 +03:00

21 lines
880 B
TypeScript

import { Module } from "@nestjs/common";
import { HttpModule } from "@nestjs/axios";
import { TypeOrmModule } from "@nestjs/typeorm";
import { NotificationOutbox } from "./entities/notification-outbox.entity";
import { OutboxRelayService } from "./outbox-relay.service";
import { OutboxRepository } from "./outbox.repository";
import { HttpPaymentEventPublisher } from "./publisher/http-payment-event-publisher";
import { PAYMENT_EVENT_PUBLISHER } from "./publisher/payment-event-publisher";
@Module({
imports: [TypeOrmModule.forFeature([NotificationOutbox]), HttpModule],
providers: [
OutboxRepository,
OutboxRelayService,
// Swap to RabbitPaymentEventPublisher here when the broker lands — nothing else changes.
{ provide: PAYMENT_EVENT_PUBLISHER, useClass: HttpPaymentEventPublisher },
],
exports: [OutboxRepository],
})
export class OutboxModule {}