콘텐츠 메인
- 단편 탭 API
This commit is contained in:
@@ -6,19 +6,13 @@ import kr.co.vividnext.sodalive.content.ContentType
|
||||
import kr.co.vividnext.sodalive.content.SortType
|
||||
import kr.co.vividnext.sodalive.content.theme.content.GetContentByThemeResponse
|
||||
import kr.co.vividnext.sodalive.member.Member
|
||||
import kr.co.vividnext.sodalive.member.block.BlockMemberRepository
|
||||
import org.springframework.beans.factory.annotation.Value
|
||||
import org.springframework.stereotype.Service
|
||||
import org.springframework.transaction.annotation.Transactional
|
||||
|
||||
@Service
|
||||
class AudioContentThemeService(
|
||||
private val queryRepository: AudioContentThemeQueryRepository,
|
||||
private val blockMemberRepository: BlockMemberRepository,
|
||||
private val contentRepository: AudioContentRepository,
|
||||
|
||||
@Value("\${cloud.aws.cloud-front.host}")
|
||||
private val imageHost: String
|
||||
private val contentRepository: AudioContentRepository
|
||||
) {
|
||||
@Transactional(readOnly = true)
|
||||
fun getThemes(): List<GetAudioContentThemeResponse> {
|
||||
@@ -46,7 +40,6 @@ class AudioContentThemeService(
|
||||
)
|
||||
|
||||
val items = contentRepository.findByTheme(
|
||||
cloudfrontHost = imageHost,
|
||||
memberId = member.id!!,
|
||||
theme = theme.theme,
|
||||
sortType = sortType,
|
||||
@@ -55,9 +48,6 @@ class AudioContentThemeService(
|
||||
offset = offset,
|
||||
limit = limit
|
||||
)
|
||||
.asSequence()
|
||||
.filter { !blockMemberRepository.isBlocked(blockedMemberId = member.id!!, memberId = it.creatorId) }
|
||||
.toList()
|
||||
|
||||
return GetContentByThemeResponse(
|
||||
theme = theme.theme,
|
||||
|
Reference in New Issue
Block a user