Skip to content

Commit

Permalink
fix: add bookId when get groupDetail
Browse files Browse the repository at this point in the history
  • Loading branch information
silkair committed Feb 16, 2025
1 parent 6eb04bb commit d2400a8
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ public class GroupDetailResponseDto {
private String goalContent;
private String masterNickname;
private String masterImage;
private Long bookId;

@Builder
private GroupDetailResponseDto(Long groupId, String groupName, String groupDescription, int maxMembers, int currentMembers,
GroupStatus status, BookResponseDto book, String goalType,
String goalContent, String masterNickname, String masterImage) {
String goalContent, String masterNickname, String masterImage, Long bookId) {
this.groupId = groupId;
this.groupName = groupName;
this.groupDescription = groupDescription;
Expand All @@ -38,6 +39,7 @@ private GroupDetailResponseDto(Long groupId, String groupName, String groupDescr
this.goalContent = goalContent;
this.masterNickname = masterNickname;
this.masterImage = masterImage;
this.bookId = bookId;
}

public static GroupDetailResponseDto toDto(Group group, int currentMembers, User masterUser) {
Expand All @@ -53,6 +55,7 @@ public static GroupDetailResponseDto toDto(Group group, int currentMembers, User
.goalContent(group.getGoalContent())
.masterNickname(masterUser.getNickname())
.masterImage(masterUser.getImage())
.bookId(group.getBook().getId())
.build();
}
}

0 comments on commit d2400a8

Please sign in to comment.