테마별 콘텐츠 가져오기 API
- 총 개수 추가
This commit is contained in:
@@ -35,6 +35,12 @@ class AudioContentThemeService(
|
||||
val theme = queryRepository.findThemeByIdAndActive(themeId)
|
||||
?: throw SodaException("잘못된 요청입니다.")
|
||||
|
||||
val totalCount = contentRepository.totalCountByTheme(
|
||||
memberId = member.id!!,
|
||||
theme = theme.theme,
|
||||
isAdult = member.auth != null
|
||||
)
|
||||
|
||||
val items = contentRepository.findByTheme(
|
||||
cloudfrontHost = imageHost,
|
||||
memberId = member.id!!,
|
||||
@@ -50,6 +56,7 @@ class AudioContentThemeService(
|
||||
|
||||
return GetContentByThemeResponse(
|
||||
theme = theme.theme,
|
||||
totalCount = totalCount,
|
||||
items = items
|
||||
)
|
||||
}
|
||||
|
@@ -4,5 +4,6 @@ import kr.co.vividnext.sodalive.content.main.GetAudioContentMainItem
|
||||
|
||||
data class GetContentByThemeResponse(
|
||||
val theme: String,
|
||||
val totalCount: Int,
|
||||
val items: List<GetAudioContentMainItem>
|
||||
)
|
||||
|
Reference in New Issue
Block a user