mirror of
https://gitlab.com/mobicoop/v3/service/matcher.git
synced 2026-01-01 08:12:40 +00:00
fix wrong id for ad creation
This commit is contained in:
@@ -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 }),
|
||||
);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user