Skip to content

Commit

Permalink
#231 Refactor: 와인 리뷰 조회 메서드명 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongyeon0208 committed Dec 18, 2024
1 parent d4bb19d commit d7e5999
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.drinkeg.drinkeg.apipayLoad.ApiResponse;
import com.drinkeg.drinkeg.wine.dto.response.SearchWineResponseDTO;
import com.drinkeg.drinkeg.wine.dto.response.WineResponseWithThreeReviewsDTO;
import com.drinkeg.drinkeg.wine.dto.response.WineReviewDTO;
import com.drinkeg.drinkeg.dto.loginDTO.commonDTO.PrincipalDetail;
import com.drinkeg.drinkeg.wine.dto.response.WineReviewResponseDTO;
import com.drinkeg.drinkeg.wine.service.WineService;
Expand Down Expand Up @@ -50,8 +49,7 @@ public ApiResponse<WineResponseWithThreeReviewsDTO> showWine(@AuthenticationPrin
public ApiResponse<WineReviewResponseDTO> showWineReview(@AuthenticationPrincipal PrincipalDetail principalDetail,
@PathVariable("wineId") Long wineId, @RequestParam Boolean orderByLatest) {

WineReviewResponseDTO wineReviewResponseDTO = wineService.getWineReviewsByWineId(wineId, principalDetail, orderByLatest);

WineReviewResponseDTO wineReviewResponseDTO = wineService.getWineReviewsAndIsLikedByWineId(wineId, principalDetail, orderByLatest);

return ApiResponse.onSuccess(wineReviewResponseDTO);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public interface WineService {

public WineResponseWithThreeReviewsDTO getWineResponseByWineId(Long wineId, PrincipalDetail principalDetail);

public WineReviewResponseDTO getWineReviewsByWineId(Long wineId, PrincipalDetail principalDetail, boolean orderByLatest);
public WineReviewResponseDTO getWineReviewsAndIsLikedByWineId(Long wineId, PrincipalDetail principalDetail, boolean orderByLatest);

public HomeResponseDTO getHomeResponse(PrincipalDetail principalDetail);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public WineResponseWithThreeReviewsDTO getWineResponseByWineId(Long wineId, Prin
}

@Override
public WineReviewResponseDTO getWineReviewsByWineId(Long wineId, PrincipalDetail principalDetail, boolean orderByLatest){
public WineReviewResponseDTO getWineReviewsAndIsLikedByWineId(Long wineId, PrincipalDetail principalDetail, boolean orderByLatest){
// 회원을 조회한다.
Member member = memberRepository.findByUsername(principalDetail.getUsername()).orElseThrow(
() -> new GeneralException(ErrorStatus.MEMBER_NOT_FOUND));
Expand Down

0 comments on commit d7e5999

Please sign in to comment.