fix(content): 콘텐츠 리스트 조회 API
- 로그인 된 사용자만 사용할 수 있도록 수정
This commit is contained in:
@@ -246,6 +246,8 @@ class AudioContentController(private val service: AudioContentService) {
|
||||
@AuthenticationPrincipal(expression = "#this == 'anonymousUser' ? null : member") member: Member?,
|
||||
pageable: Pageable
|
||||
) = run {
|
||||
if (member == null) throw SodaException("로그인 정보를 확인해주세요.")
|
||||
|
||||
ApiResponse.ok(
|
||||
service.getLatestContentByTheme(
|
||||
theme = emptyList(),
|
||||
@@ -253,11 +255,7 @@ class AudioContentController(private val service: AudioContentService) {
|
||||
offset = pageable.offset,
|
||||
limit = pageable.pageSize.toLong(),
|
||||
isFree = isFree ?: false,
|
||||
isAdult = if (member != null) {
|
||||
(isAdultContentVisible ?: true) && member.auth != null
|
||||
} else {
|
||||
false
|
||||
},
|
||||
isAdult = (isAdultContentVisible ?: true) && member.auth != null,
|
||||
isPointAvailableOnly = isPointAvailableOnly ?: false
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user