fix(content-ranking): 랭킹 커버 이미지를 CDN URL로 변환한다
This commit is contained in:
@@ -2,6 +2,7 @@ package kr.co.vividnext.sodalive.v2.content.ranking.application
|
||||
|
||||
import kr.co.vividnext.sodalive.member.Member
|
||||
import kr.co.vividnext.sodalive.member.contentpreference.MemberContentPreferenceService
|
||||
import kr.co.vividnext.sodalive.v2.common.domain.toCdnUrl
|
||||
import kr.co.vividnext.sodalive.v2.content.ranking.domain.AudioRanking
|
||||
import kr.co.vividnext.sodalive.v2.content.ranking.domain.AudioRankingItem
|
||||
import kr.co.vividnext.sodalive.v2.content.ranking.domain.AudioRankingType
|
||||
@@ -9,6 +10,7 @@ import kr.co.vividnext.sodalive.v2.content.ranking.port.out.AudioRankingBlockPor
|
||||
import kr.co.vividnext.sodalive.v2.content.ranking.port.out.AudioRankingSnapshotPort
|
||||
import kr.co.vividnext.sodalive.v2.content.ranking.port.out.AudioRankingSnapshotRecord
|
||||
import org.slf4j.LoggerFactory
|
||||
import org.springframework.beans.factory.annotation.Value
|
||||
import org.springframework.stereotype.Service
|
||||
import java.time.ZoneOffset
|
||||
import java.time.ZonedDateTime
|
||||
@@ -19,6 +21,8 @@ class AudioRankingQueryService(
|
||||
private val memberContentPreferenceService: MemberContentPreferenceService,
|
||||
private val blockPort: AudioRankingBlockPort,
|
||||
private val jobService: AudioRankingSnapshotJobService,
|
||||
@Value("\${cloud.aws.cloud-front.host}")
|
||||
private val cloudFrontHost: String,
|
||||
private val nowProvider: () -> ZonedDateTime = { ZonedDateTime.now() }
|
||||
) {
|
||||
private val log = LoggerFactory.getLogger(javaClass)
|
||||
@@ -105,7 +109,7 @@ class AudioRankingQueryService(
|
||||
rank = rank,
|
||||
rankChange = if (showRankChange && previousRank != null) previousRank - rank else null,
|
||||
isNew = showRankChange && previousRank == null,
|
||||
coverImageUrl = coverImageUrl
|
||||
coverImageUrl = coverImageUrl.toCdnUrl(cloudFrontHost)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user