-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
이메일 및 그룹 번호 정보 반환
- Loading branch information
Showing
1 changed file
with
8 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; | ||
|
||
|
@@ -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) | ||
|
@@ -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(); | ||
} | ||
} | ||
|
||
|