Skip to content

Commit be14ba1

Browse files
committed
update 03-update-migrate-app
1 parent 2e9a35a commit be14ba1

72 files changed

Lines changed: 499 additions & 582 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

06-rest-api/03-graphql/02-crud/01-graphql-backend/src/pods/hotel/hotel.mappers.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import * as viewModel from './hotel.vm';
44
export const mapHotelFromApiToVm = (
55
hotel: apiModel.Hotel
66
): viewModel.Hotel => ({
7-
...hotel,
87
id: hotel.id,
98
name: hotel.name,
109
description: hotel.shortDescription,
@@ -14,12 +13,11 @@ export const mapHotelFromApiToVm = (
1413
});
1514

1615
export const mapHotelFromVmToApi = (hotel: viewModel.Hotel): apiModel.Hotel =>
17-
(({
18-
...hotel,
16+
({
1917
id: hotel.id,
2018
name: hotel.name,
2119
shortDescription: hotel.description,
2220
hotelRating: hotel.rating,
2321
address1: hotel.address,
2422
city: hotel.city,
25-
} as unknown) as apiModel.Hotel);
23+
} as unknown as apiModel.Hotel);

06-rest-api/03-graphql/02-crud/02-graphql-frontend/src/pods/hotel/hotel.mappers.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import * as viewModel from './hotel.vm';
44
export const mapHotelFromApiToVm = (
55
hotel: apiModel.Hotel
66
): viewModel.Hotel => ({
7-
...hotel,
87
id: hotel.id,
98
name: hotel.name,
109
description: hotel.shortDescription,
@@ -14,12 +13,11 @@ export const mapHotelFromApiToVm = (
1413
});
1514

1615
export const mapHotelFromVmToApi = (hotel: viewModel.Hotel): apiModel.Hotel =>
17-
(({
18-
...hotel,
16+
({
1917
id: hotel.id,
2018
name: hotel.name,
2119
shortDescription: hotel.description,
2220
hotelRating: hotel.rating,
2321
address1: hotel.address,
2422
city: hotel.city,
25-
} as unknown) as apiModel.Hotel);
23+
} as unknown as apiModel.Hotel);

0 commit comments

Comments
 (0)