콘텐츠 상세

- 차단된 사용자여도 이미 구매한 콘텐츠는 접근할 수 있도록 수정
This commit is contained in:
Klaus 2024-03-29 17:09:00 +09:00
parent ccf8b0220e
commit 2dfaf4ebae
1 changed files with 5 additions and 4 deletions

View File

@ -453,10 +453,6 @@ class AudioContentService(
val notificationUserIds = explorerQueryRepository.getNotificationUserIds(creatorId)
val isFollowing = notificationUserIds.contains(member.id)
// 차단된 사용자 체크
val isBlocked = blockMemberRepository.isBlocked(blockedMemberId = member.id!!, memberId = creatorId)
if (isBlocked) throw SodaException("${creator.nickname}님의 요청으로 콘텐츠 접근이 제한됩니다.")
// 구매 여부 확인
val isExistsBundleAudioContent = bundleAudioContentList
.map { orderRepository.isExistOrdered(memberId = member.id!!, contentId = it.id!!) }
@ -468,6 +464,11 @@ class AudioContentService(
)
val existOrdered = isExistsBundleAudioContent || isExistsAudioContent
// 차단된 사용자 체크
val isBlocked = blockMemberRepository.isBlocked(blockedMemberId = member.id!!, memberId = creatorId)
if (isBlocked && !existOrdered) throw SodaException("${creator.nickname}님의 요청으로 콘텐츠 접근이 제한됩니다.")
val orderSequence = if (existOrdered) {
limitedEditionOrderRepository.getOrderSequence(
contentId = audioContent.id!!,