Skip to content

Commit

Permalink
Merge pull request #75 from Room-Fit/feat/#74
Browse files Browse the repository at this point in the history
모든 사용자 조회 API에 설문 유무 포함 및 비밀번호 필드 제거
  • Loading branch information
KNU-K authored Feb 5, 2025
2 parents 212d83d + 171294a commit 1cfaa02
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,22 @@ public static class Response{
private String nickname;
private String email;
private String role;
private String password;
private String birth;
private Integer studentId;
private String college;
private String gender;
private boolean isSurveyComplete;
public static Response of(User user) {
return Response.builder()
.id(user.getId())
.nickname(user.getNickname())
.email(user.getEmail())
.role(user.getRole().name())
.password(user.getPassword())
.birth(user.getBirth())
.studentId(user.getStudentId())
.college(user.getCollege())
.gender(user.getGender().name())
.isSurveyComplete(user.isSurveyComplete())
.build();
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/roomfit/be/user/domain/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,8 @@ public static User createUser(String nickname, String email, String password, St
public void completeSurvey() {
this.stage = SurveyStage.POST_SURVEY;
}

public boolean isSurveyComplete() {
return this.stage.name().equals(SurveyStage.POST_SURVEY.name());
}
}

0 comments on commit 1cfaa02

Please sign in to comment.