fix: 라이브 다시듣기 콘텐츠 API 추가
This commit is contained in:
parent
d18c19dd35
commit
8e877a6366
|
@ -236,4 +236,24 @@ class AudioContentController(private val service: AudioContentService) {
|
||||||
|
|
||||||
ApiResponse.ok(service.unpinAtTheTop(contentId = id, member = member))
|
ApiResponse.ok(service.unpinAtTheTop(contentId = id, member = member))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/replay-live")
|
||||||
|
fun replayLive(
|
||||||
|
@RequestParam("isAdultContentVisible", required = false) isAdultContentVisible: Boolean? = null,
|
||||||
|
@RequestParam("contentType", required = false) contentType: ContentType? = null,
|
||||||
|
@AuthenticationPrincipal(expression = "#this == 'anonymousUser' ? null : member") member: Member?
|
||||||
|
) = run {
|
||||||
|
ApiResponse.ok(
|
||||||
|
service.getLatestContentByTheme(
|
||||||
|
theme = listOf("다시듣기"),
|
||||||
|
contentType = contentType ?: ContentType.ALL,
|
||||||
|
isFree = false,
|
||||||
|
isAdult = if (member != null) {
|
||||||
|
(isAdultContentVisible ?: true) && member.auth != null
|
||||||
|
} else {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -490,10 +490,8 @@ class AudioContentQueryRepositoryImpl(
|
||||||
where = where.and(audioContentTheme.theme.`in`(theme))
|
where = where.and(audioContentTheme.theme.`in`(theme))
|
||||||
}
|
}
|
||||||
|
|
||||||
where = if (isFree) {
|
if (isFree) {
|
||||||
where.and(audioContent.price.loe(0))
|
where = where.and(audioContent.price.loe(0))
|
||||||
} else {
|
|
||||||
where.and(audioContent.price.gt(0))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return queryFactory
|
return queryFactory
|
||||||
|
|
Loading…
Reference in New Issue