Skip to content

Commit

Permalink
Merge pull request #61 from VentionCapstone/hotfix/add-properties-to-…
Browse files Browse the repository at this point in the history
…response

fix(update): add properties to response (whishlist)
  • Loading branch information
Zach13131 authored Jan 23, 2024
2 parents 76abd79 + eeacca6 commit b19e99d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/accommodation/accommodation.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@ export class AccommodationService {
const findManyOptions: Prisma.AccommodationFindManyArgs = {
select: {
id: true,
title: true,
thumbnailUrl: true,
squareMeters: true,
numberOfRooms: true,
Expand All @@ -509,6 +510,8 @@ export class AccommodationService {
street: true,
city: true,
country: true,
latitude: true,
longitude: true,
},
},
},
Expand Down
8 changes: 6 additions & 2 deletions src/wishlist/wishlist.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,12 @@ export class WishlistService {
});
const accommodationsWithWishlist = accommadationsFromWishlist.map((accom) => {
return {
...accom,
isInWishlist: true,
id: accom.id,
createdAt: accom.createdAt,
accommodation: {
...accom.accommodation,
isInWishlist: true,
},
};
});
return {
Expand Down

0 comments on commit b19e99d

Please sign in to comment.