Skip to content

Commit

Permalink
mod: 이미지 조회 로직 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
wonlog-g committed Aug 16, 2024
1 parent db260a1 commit 58859d2
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ class DefaultMemberUseCase(
val relations = memberRelationService.findRelationByIds(memberId, members.map { it.id })
val relationMap = relations.associateBy { it.toId.value }

// todo: 프로필 이미지 조회 (코드 중복으로 https://github.com/mash-up-kr/Dojo-Spring/pull/93 PR 머지 후 추가 예정)
var images = imageService.loadAllByIds(members.map { it.profileImageId })
var imageMap = images.associateBy { it.id.value }

return members.map { member ->
val relation =
Expand All @@ -197,7 +198,7 @@ class DefaultMemberUseCase(

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

0 comments on commit 58859d2

Please sign in to comment.