File tree Expand file tree Collapse file tree 4 files changed +13
-3
lines changed
Expand file tree Collapse file tree 4 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -14,4 +14,5 @@ public class FollowerListResponseDto {
1414 private Long followerId ;
1515
1616 private String nickname ;
17+ private String profileImage ;
1718}
Original file line number Diff line number Diff line change @@ -14,4 +14,5 @@ public class FollowingListResponseDto {
1414 private Long followingId ;
1515
1616 private String nickname ;
17+ private String profileImage ;
1718}
Original file line number Diff line number Diff line change @@ -22,6 +22,12 @@ public class FollowService {
2222 private final FollowRepository followRepository ;
2323 private final MemberRepository memberRepository ;
2424
25+ public String getDefaultProfile (String image ) {
26+ return (image == null || image .isBlank ())
27+ ? "https://fixlogsmwubucket.s3.ap-northeast-2.amazonaws.com/default/DefaultImage.png"
28+ : image ;
29+ }
30+
2531 // 팔로우하기
2632 @ Transactional
2733 public FollowResponseDto follow (String requesterEmail , Long targetMemberId ){
@@ -78,7 +84,8 @@ public List<FollowerListResponseDto> getMyFollowers(String requesterEmail) {
7884 .map (follow -> new FollowerListResponseDto (
7985 follow .getFollowId (),
8086 follow .getFollowerId ().getUserId (),
81- follow .getFollowerId ().getNickname ()
87+ follow .getFollowerId ().getNickname (),
88+ getDefaultProfile (follow .getFollowerId ().getProfileImageUrl ())
8289 ))
8390 .toList ();
8491 }
@@ -95,7 +102,8 @@ public List<FollowingListResponseDto> getMyFollowings(String requesterEmail) {
95102 .map (follow -> new FollowingListResponseDto (
96103 follow .getFollowId (),
97104 follow .getFollowingId ().getUserId (),
98- follow .getFollowingId ().getNickname ()
105+ follow .getFollowingId ().getNickname (),
106+ getDefaultProfile (follow .getFollowingId ().getProfileImageUrl ())
99107 ))
100108 .toList ();
101109 }
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ spring.application.name=FixLog
2828# # Spring Security
2929# logging.level.org.springframework.security=DEBUG
3030
31- # #### [PROD] #####
31+ # ##### [PROD] #####
3232server.port =8083
3333
3434spring.datasource.driver-class-name =com.mysql.cj.jdbc.Driver
You can’t perform that action at this time.
0 commit comments