diff --git a/src/main/java/net/teumteum/user/domain/response/UserGetResponse.java b/src/main/java/net/teumteum/user/domain/response/UserGetResponse.java index 34ee5b5d..4777dd9b 100644 --- a/src/main/java/net/teumteum/user/domain/response/UserGetResponse.java +++ b/src/main/java/net/teumteum/user/domain/response/UserGetResponse.java @@ -17,7 +17,8 @@ public record UserGetResponse( String status, String goal, Job job, - List interests + List interests, + int friends ) { public static UserGetResponse of(User user) { @@ -33,7 +34,8 @@ public static UserGetResponse of(User user) { user.getStatus().name(), user.getGoal(), Job.of(user), - user.getInterests() + user.getInterests(), + user.getFriends().size() ); } diff --git a/src/main/java/net/teumteum/user/domain/response/UserMeGetResponse.java b/src/main/java/net/teumteum/user/domain/response/UserMeGetResponse.java index d9ea035b..c01edc2a 100644 --- a/src/main/java/net/teumteum/user/domain/response/UserMeGetResponse.java +++ b/src/main/java/net/teumteum/user/domain/response/UserMeGetResponse.java @@ -18,8 +18,8 @@ public record UserMeGetResponse( String status, String goal, Job job, - String oauthType, - List interests + List interests, + int friends ) { public static UserMeGetResponse of(User user) { @@ -35,11 +35,12 @@ public static UserMeGetResponse of(User user) { user.getStatus().name(), user.getGoal(), Job.of(user), - user.getOauth().getAuthenticated().name(), - user.getInterests() + user.getInterests(), + user.getFriends().size() ); } + public record Job(String name, boolean certificated, @JsonProperty("class") String jobClass, String detailClass) { public static Job of(User user) { diff --git a/src/main/java/net/teumteum/user/domain/response/UsersGetByIdResponse.java b/src/main/java/net/teumteum/user/domain/response/UsersGetByIdResponse.java index 40406e2d..db4597af 100644 --- a/src/main/java/net/teumteum/user/domain/response/UsersGetByIdResponse.java +++ b/src/main/java/net/teumteum/user/domain/response/UsersGetByIdResponse.java @@ -28,7 +28,8 @@ public record UserGetResponse( String status, String goal, Job job, - List interests + List interests, + int friends ) { public static UserGetResponse of(User user) { @@ -44,7 +45,8 @@ public static UserGetResponse of(User user) { user.getStatus().name(), user.getGoal(), Job.of(user), - user.getInterests() + user.getInterests(), + user.getFriends().size() ); }