@@ -24,8 +24,10 @@ public class EmotionRecordController {
2424 summary = "감정 기록 작성/저장 API" ,
2525 description = "작성한 감정 기록을 저장합니다."
2626 )
27- public ResponseResult saveEmotionWithMusic (@ Valid @ RequestBody EmotionRecordRequestDTO request ) {
28- return emotionRecordService .saveEmotionRecordWithMusic (request );
27+ public ResponseResult saveEmotionWithMusic (
28+ @ AuthenticationPrincipal Long userId ,
29+ @ Valid @ RequestBody EmotionRecordRequestDTO request ) {
30+ return emotionRecordService .saveEmotionRecordWithMusic (userId , request );
2931 }
3032
3133 @ GetMapping
@@ -34,10 +36,9 @@ public ResponseResult saveEmotionWithMusic(@Valid @RequestBody EmotionRecordRequ
3436 description = "유저들이 작성한 감정 기록 전체를 조회합니다.(자신의 아이디에 해당하는 감정 기록은 조회되지 않습니다.)"
3537 )
3638 public ResponseResult getEmotionRecordsWithoutMine (
37- /* @AuthenticationPrincipal*/ Long userId ,
39+ @ AuthenticationPrincipal Long userId ,
3840 @ RequestParam (defaultValue = "0" ) int page ,
3941 @ RequestParam (defaultValue = "10" ) int size ) {
40-
4142 return emotionRecordService .getEmotionRecordsExcludingUserId (userId , page , size );
4243 }
4344
@@ -60,7 +61,7 @@ public ResponseResult getAllEmotionRecords(
6061 )
6162 public ResponseResult getEmotionRecord (
6263 @ PathVariable Long recordId ,
63- /* @AuthenticationPrincipal*/ Long userId ) {
64+ @ AuthenticationPrincipal Long userId ) {
6465 return emotionRecordService .getEmotionRecord (userId , recordId );
6566 }
6667
0 commit comments