parent
811810cd36
commit
e068b57062
|
@ -2,7 +2,6 @@ package kr.co.vividnext.sodalive.api.live
|
||||||
|
|
||||||
import kr.co.vividnext.sodalive.content.AudioContentService
|
import kr.co.vividnext.sodalive.content.AudioContentService
|
||||||
import kr.co.vividnext.sodalive.content.ContentType
|
import kr.co.vividnext.sodalive.content.ContentType
|
||||||
import kr.co.vividnext.sodalive.explorer.ExplorerQueryRepository
|
|
||||||
import kr.co.vividnext.sodalive.explorer.profile.creatorCommunity.CreatorCommunityService
|
import kr.co.vividnext.sodalive.explorer.profile.creatorCommunity.CreatorCommunityService
|
||||||
import kr.co.vividnext.sodalive.live.recommend.LiveRecommendService
|
import kr.co.vividnext.sodalive.live.recommend.LiveRecommendService
|
||||||
import kr.co.vividnext.sodalive.live.room.LiveRoomService
|
import kr.co.vividnext.sodalive.live.room.LiveRoomService
|
||||||
|
@ -19,8 +18,7 @@ class LiveApiService(
|
||||||
private val recommendService: LiveRecommendService,
|
private val recommendService: LiveRecommendService,
|
||||||
private val creatorCommunityService: CreatorCommunityService,
|
private val creatorCommunityService: CreatorCommunityService,
|
||||||
|
|
||||||
private val blockMemberRepository: BlockMemberRepository,
|
private val blockMemberRepository: BlockMemberRepository
|
||||||
private val explorerQueryRepository: ExplorerQueryRepository
|
|
||||||
) {
|
) {
|
||||||
fun fetchData(
|
fun fetchData(
|
||||||
isAdultContentVisible: Boolean,
|
isAdultContentVisible: Boolean,
|
||||||
|
@ -53,16 +51,6 @@ class LiveApiService(
|
||||||
val recommendLiveList = recommendService.getRecommendLive(member)
|
val recommendLiveList = recommendService.getRecommendLive(member)
|
||||||
|
|
||||||
val latestFinishedLiveList = liveService.getLatestFinishedLive(member)
|
val latestFinishedLiveList = liveService.getLatestFinishedLive(member)
|
||||||
.map {
|
|
||||||
if (memberId != null) {
|
|
||||||
it.following = explorerQueryRepository.getCreatorFollowing(
|
|
||||||
creatorId = it.memberId,
|
|
||||||
memberId = memberId
|
|
||||||
)?.isFollow ?: false
|
|
||||||
}
|
|
||||||
|
|
||||||
it
|
|
||||||
}
|
|
||||||
|
|
||||||
val replayLive = contentService.getLatestContentByTheme(
|
val replayLive = contentService.getLatestContentByTheme(
|
||||||
theme = listOf("다시듣기"),
|
theme = listOf("다시듣기"),
|
||||||
|
|
|
@ -16,8 +16,7 @@ data class GetLatestFinishedLiveResponse(
|
||||||
@JsonProperty("memberId") val memberId: Long,
|
@JsonProperty("memberId") val memberId: Long,
|
||||||
@JsonProperty("nickname") val nickname: String,
|
@JsonProperty("nickname") val nickname: String,
|
||||||
@JsonProperty("profileImageUrl") val profileImageUrl: String,
|
@JsonProperty("profileImageUrl") val profileImageUrl: String,
|
||||||
@JsonProperty("timeAgo") val timeAgo: String,
|
@JsonProperty("timeAgo") val timeAgo: String
|
||||||
@JsonProperty("following") var following: Boolean = false
|
|
||||||
) {
|
) {
|
||||||
constructor(response: GetLatestFinishedLiveQueryResponse) : this(
|
constructor(response: GetLatestFinishedLiveQueryResponse) : this(
|
||||||
response.memberId,
|
response.memberId,
|
||||||
|
|
Loading…
Reference in New Issue