Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #104 from Mini-Team-6/feature/#103-cart-hotfix
Browse files Browse the repository at this point in the history
Hotfix: cartService 룸생성 시 roomId -> roomTypeId로 수정
  • Loading branch information
ypd06021 authored Nov 29, 2023
2 parents 885197b + 951d7a6 commit 701fdc5
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public CartCreateResponse createCart(Long userId, CartCreateRequest cartCreateRe
Member member = getMemberById(userId);
Accommodation accommodation =
createAccommodationById(cartCreateRequest.keyword(), cartCreateRequest.areaCode());
Room room = createRoomById(accommodation, cartCreateRequest.roomTypeId());
Room room = createRoomByRoomTypeId(accommodation, cartCreateRequest.roomTypeId());

Cart cart = createCart(cartCreateRequest, room, member);
Cart createdCart = cartRepository.save(cart);
Expand Down Expand Up @@ -78,8 +78,8 @@ private Accommodation createAccommodationById(String keyword, AreaCode areaCode)
return getOrSaveAccommodation(accommodation);
}

private Room createRoomById(Accommodation accommodation, Long roomId) {
Room room = tourAPIService.bringRoom(accommodation.getId(), roomId);
private Room createRoomByRoomTypeId(Accommodation accommodation, Long roomTypeId) {
Room room = tourAPIService.bringRoom(accommodation.getId(), roomTypeId);
return getOrSaveRoom(room);
}

Expand Down

0 comments on commit 701fdc5

Please sign in to comment.