Skip to content

Commit

Permalink
mod: 이미지 없는 경우 default 이미지 url 반환
Browse files Browse the repository at this point in the history
  • Loading branch information
wonlog-g committed Aug 21, 2024
1 parent 6f8d3bf commit 5832305
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import com.mashup.dojo.service.ImageService
import com.mashup.dojo.service.MemberRelationService
import com.mashup.dojo.service.MemberService
import com.mashup.dojo.service.PickService
import com.mashup.dojo.service.ProfileImageProperties
import com.mashup.dojo.service.calculateRanks
import org.springframework.stereotype.Component
import org.springframework.transaction.annotation.Transactional
Expand Down Expand Up @@ -88,6 +89,7 @@ class DefaultMemberUseCase(
private val coinService: CoinService,
private val imageService: ImageService,
private val pickService: PickService,
private val imageProperties: ProfileImageProperties,
) : MemberUseCase {
@Transactional
override fun create(command: MemberUseCase.CreateCommand): MemberId {
Expand Down Expand Up @@ -198,7 +200,7 @@ class DefaultMemberUseCase(

MemberUseCase.MemberSearchInfo(
memberId = member.id.value,
profileImageUrl = imageMap[member.profileImageId.value]?.url.let { "" },
profileImageUrl = imageMap[member.profileImageId.value]?.url ?: imageProperties.unknown,
memberName = member.fullName,
platform = member.platform.name,
ordinal = member.ordinal,
Expand Down

0 comments on commit 5832305

Please sign in to comment.