@@ -3,8 +3,8 @@ package goodspace.bllsoneshot.task.controller
33import goodspace.bllsoneshot.global.security.userId
44import goodspace.bllsoneshot.task.dto.request.ResourceCreateRequest
55import goodspace.bllsoneshot.task.dto.request.ResourceUpdateRequest
6- import goodspace.bllsoneshot.task.dto.response.ResourceResponse
7- import goodspace.bllsoneshot.task.dto.response.ResourcesResponse
6+ import goodspace.bllsoneshot.task.dto.response.submit. ResourceResponse
7+ import goodspace.bllsoneshot.task.dto.response.resource.ResourceSummaryResponse
88import goodspace.bllsoneshot.task.service.ResourceService
99import io.swagger.v3.oas.annotations.Operation
1010import io.swagger.v3.oas.annotations.tags.Tag
@@ -41,19 +41,48 @@ class ResourceController(
4141
4242 [응답]
4343 resourceId: 자료 ID
44- subject: 과목(KOREAN, ENGLISH, MATH)
44+ resourceName: 자료 이름
4545 registeredDate: 등록일
46+ subject: 과목(KOREAN, ENGLISH, MATH)
4647 """
4748 )
4849 fun getResources (
4950 principal : Principal ,
5051 @RequestParam menteeId : Long
51- ): ResponseEntity <ResourcesResponse > {
52+ ): ResponseEntity <List < ResourceSummaryResponse > > {
5253 val mentorId = principal.userId
5354 val response = resourceService.getResources(mentorId, menteeId)
5455 return ResponseEntity .ok(response)
5556 }
5657
58+ @GetMapping(" /{resourceId}" )
59+ @Operation(
60+ summary = " 자료 상세 조회" ,
61+ description = """
62+ 특정 멘티의 자료 하나를 상세 조회합니다.
63+
64+ [요청]
65+ resourceId: 자료 ID
66+
67+ [응답]
68+ resourceId: 자료 ID
69+ subject: 과목(KOREAN, ENGLISH, MATH)
70+ resourceName: 자료 이름
71+ registeredDate: 등록일
72+ worksheets: 학습 자료(워크시트) 목록
73+ columnLinks: 학습 자료(칼럼 링크) 목록
74+ """
75+ )
76+ fun getResourceDetail (
77+ principal : Principal ,
78+ @RequestParam resourceId : Long
79+ ): ResponseEntity <ResourceResponse > {
80+ val mentorId = principal.userId
81+ val response = resourceService.getResourceDetail(mentorId, resourceId)
82+
83+ return ResponseEntity .ok(response)
84+ }
85+
5786 @PostMapping
5887 @Operation(
5988 summary = " 자료 등록" ,
0 commit comments