feat(content-sort-type): getLatestContentByTheme(테마별 콘텐츠 조회)시 정렬 타입 추가
This commit is contained in:
@@ -243,6 +243,8 @@ class AudioContentController(private val service: AudioContentService) {
|
||||
@RequestParam("contentType", required = false) contentType: ContentType? = null,
|
||||
@RequestParam("isFree", required = false) isFree: Boolean? = null,
|
||||
@RequestParam("isPointAvailableOnly", required = false) isPointAvailableOnly: Boolean? = null,
|
||||
@RequestParam("sort-type", required = false) sortType: SortType? = SortType.NEWEST,
|
||||
@RequestParam("theme", required = false) theme: String? = null,
|
||||
@AuthenticationPrincipal(expression = "#this == 'anonymousUser' ? null : member") member: Member?,
|
||||
pageable: Pageable
|
||||
) = run {
|
||||
@@ -250,10 +252,11 @@ class AudioContentController(private val service: AudioContentService) {
|
||||
|
||||
ApiResponse.ok(
|
||||
service.getLatestContentByTheme(
|
||||
theme = emptyList(),
|
||||
theme = if (theme == null) listOf() else listOf(theme),
|
||||
contentType = contentType ?: ContentType.ALL,
|
||||
offset = pageable.offset,
|
||||
limit = pageable.pageSize.toLong(),
|
||||
sortType = sortType ?: SortType.NEWEST,
|
||||
isFree = isFree ?: false,
|
||||
isAdult = (isAdultContentVisible ?: true) && member.auth != null,
|
||||
isPointAvailableOnly = isPointAvailableOnly ?: false
|
||||
|
||||
Reference in New Issue
Block a user