@@ -24,8 +24,11 @@ public class EmotionRecordController {
2424 summary = "감정 기록 작성/저장 API" ,
2525 description = "작성한 감정 기록을 저장합니다."
2626 )
27- public ResponseResult saveEmotionWithMusic (@ Valid @ RequestBody EmotionRecordRequestDTO request ) {
28- return emotionRecordService .saveEmotionRecordWithMusic (request );
27+
28+ public ResponseResult saveEmotionWithMusic (
29+ @ AuthenticationPrincipal Long userId ,
30+ @ Valid @ RequestBody EmotionRecordRequestDTO request ) {
31+ return emotionRecordService .saveEmotionRecordWithMusic (userId , request );
2932 }
3033
3134 @ GetMapping
@@ -34,10 +37,9 @@ public ResponseResult saveEmotionWithMusic(@Valid @RequestBody EmotionRecordRequ
3437 description = "유저들이 작성한 감정 기록 전체를 조회합니다.(자신의 아이디에 해당하는 감정 기록은 조회되지 않습니다.)"
3538 )
3639 public ResponseResult getEmotionRecordsWithoutMine (
37- /* @AuthenticationPrincipal*/ Long userId ,
40+ @ AuthenticationPrincipal Long userId ,
3841 @ RequestParam (defaultValue = "0" ) int page ,
3942 @ RequestParam (defaultValue = "10" ) int size ) {
40-
4143 return emotionRecordService .getEmotionRecordsExcludingUserId (userId , page , size );
4244 }
4345
@@ -60,7 +62,7 @@ public ResponseResult getAllEmotionRecords(
6062 )
6163 public ResponseResult getEmotionRecord (
6264 @ PathVariable Long recordId ,
63- /* @AuthenticationPrincipal*/ Long userId ) {
65+ @ AuthenticationPrincipal Long userId ) {
6466 return emotionRecordService .getEmotionRecord (userId , recordId );
6567 }
6668
0 commit comments