diff --git a/src/modules/ad/core/application/queries/match/algorithm.abstract.ts b/src/modules/ad/core/application/queries/match/algorithm.abstract.ts index 93a4cda..f993730 100644 --- a/src/modules/ad/core/application/queries/match/algorithm.abstract.ts +++ b/src/modules/ad/core/application/queries/match/algorithm.abstract.ts @@ -20,7 +20,6 @@ export abstract class Algorithm { for (const processor of this.processors) { this.candidates = await processor.execute(this.candidates); } - // console.log(this.candidates); return this.candidates.map((candidate: CandidateEntity) => MatchEntity.create({ adId: candidate.id }), ); 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 621c6a1..9e7aa88 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 @@ -16,7 +16,7 @@ export class AdCreatedMessageHandler { const createdAd: Ad = JSON.parse(message); await this.commandBus.execute( new CreateAdCommand({ - id: createdAd.id, + id: createdAd.aggregateId, driver: createdAd.driver, passenger: createdAd.passenger, frequency: createdAd.frequency, diff --git a/src/modules/ad/interface/message-handlers/ad.types.ts b/src/modules/ad/interface/message-handlers/ad.types.ts index 5bc7e88..45eb53b 100644 --- a/src/modules/ad/interface/message-handlers/ad.types.ts +++ b/src/modules/ad/interface/message-handlers/ad.types.ts @@ -1,7 +1,7 @@ import { Frequency } from '@modules/ad/core/domain/ad.types'; export type Ad = { - id: string; + aggregateId: string; driver: boolean; passenger: boolean; frequency: Frequency;