Skip to content

Commit

Permalink
FEAT : 교화활동 세부 뷰 조회 API 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
yummygyudon committed Nov 25, 2023
1 parent 6a2f81f commit 4e16a4f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -29,4 +30,16 @@ public ResponseEntity<ApiResponse<MainView>> orderMainView(
ApiResponse.success(UserSuccess.USER_MAIN_VIEW_SUCCESS, mainViewInfo)
);
}

@GetMapping("/info/detail/{userId}")
public ResponseEntity<ApiResponse<DetailView>> 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)
);
}
}
10 changes: 10 additions & 0 deletions src/main/java/org/sopt/sopkerton/user/dto/response/DetailView.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package org.sopt.sopkerton.user.dto.response;

import java.util.List;

public record DetailView(
List<String> volunteers,
List<String> programs,
List<String> certifications
) {
}

0 comments on commit 4e16a4f

Please sign in to comment.