88import com .example .ai_tutor .domain .practice .dto .request .SavePracticeListReq ;
99import com .example .ai_tutor .domain .summary .application .SummaryService ;
1010import com .example .ai_tutor .domain .summary .dto .response .SummaryRes ;
11+ import com .example .ai_tutor .global .aop .LogExecutionTime ;
1112import com .example .ai_tutor .global .config .security .token .UserPrincipal ;
1213import com .example .ai_tutor .global .payload .ErrorResponse ;
1314import com .example .ai_tutor .global .payload .Message ;
@@ -78,6 +79,23 @@ public ResponseEntity<?> getAllNotes(
7879 return professorNoteService .getAllNotesByFolder (userPrincipal , folderId );
7980 }
8081
82+ // 노트 목록 조회
83+ @ Operation (summary = "노트 목록 조회 중 API" , security = { @ SecurityRequirement (name = "BearerAuth" ) }, description = "로그인한 유저가 만든 요청한 폴더에 대한 강의 노트 목록을 조회하는 API입니다." )
84+ @ ApiResponses (value = {
85+
86+ @ ApiResponse (responseCode = "200" , description = "강의 노트 목록 조회 성공" , content = { @ Content (mediaType = "application/json" , schema = @ Schema (implementation = NoteListRes .class ) ) } ),
87+ @ ApiResponse (responseCode = "400" , description = "강의 노트 목록 조회 실패" , content = { @ Content (mediaType = "application/json" , schema = @ Schema (implementation = ErrorResponse .class ) ) } ),
88+ })
89+ @ GetMapping ("/summary/{folderId}" )
90+ public ResponseEntity <?> getAllNotesByFolderWithSummary (
91+ @ AuthenticationPrincipal UserPrincipal userPrincipal ,
92+ @ PathVariable Long folderId
93+ ) {
94+ return professorNoteService .getAllNotesByFolderWithSummary (userPrincipal , folderId );
95+ }
96+
97+
98+
8199 @ Operation (summary = "노트 단일 조회 API" , security = { @ SecurityRequirement (name = "BearerAuth" ) }, description = "로그인한 유저가 만든 특정 강의 노트 목록을 조회하는 API입니다." )
82100 @ ApiResponses (value = {
83101 @ ApiResponse (responseCode = "200" , description = "강의 노트 목록 조회 성공" , content = { @ Content (mediaType = "application/json" , schema = @ Schema (implementation = NoteListRes .class ) ) } ),
@@ -111,6 +129,7 @@ public ResponseEntity<?> deleteNote(
111129 @ ApiResponse (responseCode = "200" , description = "STT 변환 성공" , content = { @ Content (mediaType = "application/json" , schema = @ Schema (implementation = Message .class )) }),
112130 @ ApiResponse (responseCode = "400" , description = "STT 변환 실패" , content = { @ Content (mediaType = "application/json" , schema = @ Schema (implementation = ErrorResponse .class )) }),
113131 })
132+ @ LogExecutionTime ("STT 변환 요청" )
114133 @ PostMapping (value = "/{noteId}/stt" , consumes = "multipart/form-data" )
115134 public ResponseEntity <?> convertSpeechToText (
116135// @Parameter(description = "Access Token을 입력해주세요.", required = false) @AuthenticationPrincipal UserPrincipal userPrincipal,
@@ -128,7 +147,7 @@ public ResponseEntity<?> convertSpeechToText(
128147 }
129148 } catch (Exception e ) {
130149 log .error ("STT 변환 중 오류 발생: {}" , e .getMessage (), e );
131- return ResponseEntity .badRequest ().body ("STT 변환 실패: " + e .getMessage ());
150+ return ResponseEntity .badRequest ().body ("STT 변환 실패: " + e .getMessage ());
132151 }
133152 }
134153
@@ -144,6 +163,7 @@ public ResponseEntity<?> convertSpeechToText(
144163 content = @ Content (mediaType = "application/json" ))
145164 })
146165 @ PreAuthorize ("isAuthenticated()" )
166+ @ LogExecutionTime ("노트 요약본 생성" )
147167 @ PostMapping ("/{noteId}/summaries" )
148168 public Mono <ResponseEntity <SummaryRes >> createSummary (
149169 @ Parameter (description = "note id를 입력해주세요" , required = true ) @ PathVariable Long noteId ,
0 commit comments