Skip to content

Commit

Permalink
Release: v1.1.0
Browse files Browse the repository at this point in the history
이메일 및 그룹 번호 정보 반환
  • Loading branch information
zionhann authored Oct 23, 2023
2 parents 54eff8f + 2058463 commit 8393213
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/main/java/edu/handong/csee/histudy/dto/UserDto.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ public static class UserInfo {
@Schema(description = "Group tag", example = "112")
private int group;

@Schema(description = "User email", example = "[email protected]")
private String email;

@Schema(description = "list of friend added", type = "array")
private List<UserBasic> friends;

Expand All @@ -109,6 +112,7 @@ public UserInfo(User user) {
this.name = user.getName();
this.sid = user.getSid();
this.group = (user.getStudyGroup() == null) ? 0 : user.getStudyGroup().getTag();
this.email = user.getEmail();
this.friends = user.getSentRequests().stream()
.filter(Friendship::isAccepted)
.map(Friendship::getReceived)
Expand Down Expand Up @@ -204,11 +208,15 @@ public static class UserMeWithMasking extends UserMe {
@Schema(description = "User email", example = "[email protected]")
private String email;

@Schema(description = "Group tag", example = "112")
private Integer tag;

public UserMeWithMasking(User user) {
this.id = user.getId();
this.sid = user.getSidWithMasking();
this.name = user.getName();
this.email = user.getEmail();
this.tag = user.getStudyGroup().getTag();
}
}

Expand Down

0 comments on commit 8393213

Please sign in to comment.