diff --git a/src/main/java/org/sopt/sopkerton/user/controller/UserController.java b/src/main/java/org/sopt/sopkerton/user/controller/UserController.java index 24f7029..799e846 100644 --- a/src/main/java/org/sopt/sopkerton/user/controller/UserController.java +++ b/src/main/java/org/sopt/sopkerton/user/controller/UserController.java @@ -3,6 +3,7 @@ import lombok.RequiredArgsConstructor; import org.sopt.sopkerton.common.response.ApiResponse; import org.sopt.sopkerton.user.domain.exception.UserSuccess; +import org.sopt.sopkerton.user.dto.response.DetailView; import org.sopt.sopkerton.user.dto.response.MainView; import org.sopt.sopkerton.user.service.UserService; import org.springframework.http.ResponseEntity; @@ -29,4 +30,16 @@ public ResponseEntity> orderMainView( ApiResponse.success(UserSuccess.USER_MAIN_VIEW_SUCCESS, mainViewInfo) ); } + + @GetMapping("/info/detail/{userId}") + public ResponseEntity> orderDetailView( + @PathVariable("userId") Long userId + ) { + DetailView detailInfo = userService.getDetailInfo(userId); + return ResponseEntity + .status(UserSuccess.USER_DETAIL_VIEW_SUCCESS.getHttpStatus()) + .body( + ApiResponse.success(UserSuccess.USER_DETAIL_VIEW_SUCCESS, detailInfo) + ); + } } diff --git a/src/main/java/org/sopt/sopkerton/user/dto/response/DetailView.java b/src/main/java/org/sopt/sopkerton/user/dto/response/DetailView.java new file mode 100644 index 0000000..35e9e2b --- /dev/null +++ b/src/main/java/org/sopt/sopkerton/user/dto/response/DetailView.java @@ -0,0 +1,10 @@ +package org.sopt.sopkerton.user.dto.response; + +import java.util.List; + +public record DetailView( + List volunteers, + List programs, + List certifications +) { +}