라이브 방 - 라이브 참여자 프로필 이미지에 cloudfront host 추가

This commit is contained in:
Klaus 2023-08-01 05:18:21 +09:00
parent 58a7f87ffd
commit fb1386be05
2 changed files with 11 additions and 3 deletions

View File

@ -9,10 +9,14 @@ data class LiveRoomMember(
) {
var role = LiveRoomMemberRole.LISTENER
constructor(member: Member) : this(
constructor(member: Member, cloudFrontHost: String) : this(
id = member.id!!,
nickname = member.nickname,
profileImage = member.profileImage ?: "profile/default-profile.png"
profileImage = if (member.profileImage != null) {
"$cloudFrontHost/${member.profileImage}"
} else {
"$cloudFrontHost/profile/default-profile.png"
}
)
}

View File

@ -184,7 +184,11 @@ class MemberService(
token = jwt,
nickname = member.nickname,
email = member.email,
profileImage = member.profileImage ?: ""
profileImage = if (member.profileImage != null) {
"$cloudFrontHost/${member.profileImage}"
} else {
"$cloudFrontHost/profile/default-profile.png"
}
)
}