Skip to content

Commit

Permalink
hotfix: 리뷰 조회 정렬 default 값 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
TaeyeonRoyce committed Oct 24, 2024
1 parent 7a5f2bf commit 91c4b2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class ReviewController(
@Auth auth: AuthContext,
@PathVariable restaurantId: Long,
@RequestParam(name = "onlyPhotoReview", required = false, defaultValue = "false") onlyPhotoReview: Boolean,
@RequestParam("sort", required = false, defaultValue = "high_rating") sortCondition: String,
@RequestParam("sort", required = false, defaultValue = "highRating") sortCondition: String,
@PageableDefault(size = 10, page = 0) pageable: Pageable,
): SliceResponse<ReviewPreviewResponse> {
val sort = ReadReviewSortCondition.from(sortCondition)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ enum class ReadReviewSortCondition(
fun from(sortCondition: String): ReadReviewSortCondition {
return ReadReviewSortCondition.entries
.findLast { it.value.equals(sortCondition, ignoreCase = true) }
?: throw IllegalArgumentException("정렬 조건은 high_rating, low_rating, review, createdAt 중 하나입니다. 현재 : $sortCondition")
?: throw IllegalArgumentException("정렬 조건은 highRating, lowRating, review, createdAt 중 하나입니다. 현재 : $sortCondition")
}
}
}

0 comments on commit 91c4b2b

Please sign in to comment.