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 #105 from Mini-Team-6/develop
Browse files Browse the repository at this point in the history
운영환경 cartService 오류 수정
  • Loading branch information
ypd06021 authored Nov 29, 2023
2 parents 0086208 + 701fdc5 commit 5f8849a
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 5f8849a

Please sign in to comment.