콘텐츠 메인 - 홈 탭 API

- 채널별 인기 콘텐츠의 크리에이터가 없는 경우 콘텐츠를 불러오지 않도록 수정
This commit is contained in:
Klaus 2025-02-06 21:09:11 +09:00
parent 04eb416a73
commit 27deff3ff3
1 changed files with 16 additions and 8 deletions

View File

@ -83,15 +83,23 @@ class AudioContentMainTabHomeService(
endDate = endDate.minusDays(1)
)
val salesRankContentList = rankingService.fetchCreatorContentBySalesTop2(
creatorId = contentRankCreatorList[0].creatorId,
isAdult = member.auth != null
)
val salesRankContentList = if (contentRankCreatorList.isNotEmpty()) {
rankingService.fetchCreatorContentBySalesTop2(
creatorId = contentRankCreatorList[0].creatorId,
isAdult = member.auth != null
)
} else {
emptyList()
}
val salesCountRankContentList = rankingService.fetchCreatorContentBySalesCountTop2(
creatorId = contentRankCreatorList[0].creatorId,
isAdult = member.auth != null
)
val salesCountRankContentList = if (contentRankCreatorList.isNotEmpty()) {
rankingService.fetchCreatorContentBySalesCountTop2(
creatorId = contentRankCreatorList[0].creatorId,
isAdult = member.auth != null
)
} else {
emptyList()
}
return GetContentMainTabHomeResponse(
latestNotice = latestNotice,