From 11ccefcc30db7b1e61d435953ba353910eb850fb Mon Sep 17 00:00:00 2001 From: sbriat Date: Wed, 18 Oct 2023 10:26:18 +0200 Subject: [PATCH] use constant for message handler --- .../interface/message-handlers/ad-created.message-handler.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/ad/interface/message-handlers/ad-created.message-handler.ts b/src/modules/ad/interface/message-handlers/ad-created.message-handler.ts index 9e7aa88..c089c7f 100644 --- a/src/modules/ad/interface/message-handlers/ad-created.message-handler.ts +++ b/src/modules/ad/interface/message-handlers/ad-created.message-handler.ts @@ -3,13 +3,14 @@ import { RabbitSubscribe } from '@mobicoop/message-broker-module'; import { CommandBus } from '@nestjs/cqrs'; import { CreateAdCommand } from '@modules/ad/core/application/commands/create-ad/create-ad.command'; import { Ad } from './ad.types'; +import { AD_CREATED_MESSAGE_HANDLER } from '@src/app.constants'; @Injectable() export class AdCreatedMessageHandler { constructor(private readonly commandBus: CommandBus) {} @RabbitSubscribe({ - name: 'adCreated', + name: AD_CREATED_MESSAGE_HANDLER, }) public async adCreated(message: string) { try {