콘텐츠 랭킹 정렬 조회 API 추가

This commit is contained in:
Klaus 2023-11-02 17:38:30 +09:00
parent dad31fffcb
commit 42fbcdd1e8
1 changed files with 9 additions and 0 deletions

View File

@ -152,6 +152,15 @@ class AudioContentController(private val service: AudioContentService) {
ApiResponse.ok(service.audioContentLike(request, member))
}
@GetMapping("/ranking-sort-type")
fun getAudioContentRankingSort(
@AuthenticationPrincipal(expression = "#this == 'anonymousUser' ? null : member") member: Member?
) = run {
if (member == null) throw SodaException("로그인 정보를 확인해주세요.")
ApiResponse.ok(service.getContentRankingSortTypeList())
}
@GetMapping("/ranking")
fun getAudioContentRanking(
@RequestParam("sort-type", required = false) sortType: String? = "매출",