Skip to content

Commit

Permalink
[Weekly/11/HotFix/Event] 이벤트 조회 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Daolove0323 committed Nov 15, 2024
1 parent 0c14858 commit e51ff83
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
package org.ktc2.cokaen.wouldyouin.member.api.dto.relationResponse;

import java.util.List;
import java.util.Optional;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;
import org.ktc2.cokaen.wouldyouin.image.persist.Image;
import org.ktc2.cokaen.wouldyouin.member.persist.BaseMember;
import org.ktc2.cokaen.wouldyouin.member.persist.Host;

@Builder
Expand All @@ -28,7 +31,11 @@ public static EventHostResponse from(Host host) {
.nickname(host.getNickname())
.email(host.getEmail())
.phone(host.getPhone())
.profileImageUrl(host.getProfileImage().getName())
.profileImageUrl(Optional.of(host)
.map(BaseMember::getProfileImage)
.map(Image::getName)
.orElse(null)
)
.intro(host.getIntro())
.likes(host.getLikes())
.hashtags(host.getHashtags())
Expand Down

0 comments on commit e51ff83

Please sign in to comment.