Skip to content

Commit

Permalink
#5 dateDeparture added to attributes of a wish
Browse files Browse the repository at this point in the history
  • Loading branch information
SylvainMasia committed Feb 7, 2021
1 parent ea1b169 commit 9327938
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions bookingProcessAPI/src/models/wish_dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ export class WishDTO {
numberOfCars: number;
departureNode: string;
arrivalNode: string;
dateDeparture: string;
}
1 change: 1 addition & 0 deletions itineraryDispatcher/src/models/wish_dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ export class WishDTO {
numberOfCars: number;
departureNode: string;
arrivalNode: string;
dateDeparture: string;
}
2 changes: 1 addition & 1 deletion itineraryDispatcher/src/wishes/wishes.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class WishesService {
for (let indexOfWishes = 0; indexOfWishes < wishes.length; indexOfWishes++) {
const wish = wishes[indexOfWishes];
for (let indexOfCars = 0; indexOfCars < wish.numberOfCars; indexOfCars++) {
let formatedWish = { id: `${requestTimestamp}_${indexOfWishes}-${wish.carType.charAt(0).toUpperCase()}${indexOfCars}`, carType: wish.carType, departureNode: wish.departureNode, arrivalNode: wish.arrivalNode };
let formatedWish = { id: `${requestTimestamp}_${indexOfWishes}-${wish.carType.charAt(0).toUpperCase()}${indexOfCars}`, carType: wish.carType, departureNode: wish.departureNode, arrivalNode: wish.arrivalNode, dateDeparture: wish.dateDeparture };
await this.kafkaClient.emit(`new-search`, formatedWish).toPromise();

}
Expand Down

0 comments on commit 9327938

Please sign in to comment.