Skip to content

Commit

Permalink
Merge pull request #80 from LIKELION-TEAM4-HACKATHON/fix-dto
Browse files Browse the repository at this point in the history
Fix dto
  • Loading branch information
oosedus authored Aug 6, 2024
2 parents 25d4177 + 55a3c9d commit c730c84
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/java/likelion/MZConnent/dto/club/LeaderDto.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package likelion.MZConnent.dto.club;

import likelion.MZConnent.domain.member.Age;
import likelion.MZConnent.domain.member.Gender;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand All @@ -10,12 +12,16 @@
@NoArgsConstructor
public class LeaderDto {
private String username;
private Age age;
private Gender gender;
private String profileImageUrl;
private List<SelfIntroductionDto> selfIntroductions;

@Builder
public LeaderDto(String username, String profileImageUrl, List<SelfIntroductionDto> selfIntroductions) {
public LeaderDto(String username,Age age,Gender gender, String profileImageUrl, List<SelfIntroductionDto> selfIntroductions) {
this.username = username;
this.age=age;
this.gender=gender;
this.profileImageUrl = profileImageUrl;
this.selfIntroductions = selfIntroductions;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ private ClubDetailResponse buildClubDetailResponse(Long clubId, Member member) {
.filter(cm -> cm.getClubRole() == ClubRole.LEADER)
.map(cm -> LeaderDto.builder()
.username(cm.getMember().getUsername())
.age(cm.getMember().getAge())
.gender(cm.getMember().getGender())
.profileImageUrl(cm.getMember().getProfileImageUrl())
.selfIntroductions(cm.getMember().getSelfIntroductions().stream()
.map(si -> SelfIntroductionDto.builder()
Expand Down

0 comments on commit c730c84

Please sign in to comment.