fix wrong id for ad creation
This commit is contained in:
parent
1939f62049
commit
4731020e8a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue