diff --git a/src/main/java/com/example/nexus/app/feedback/controller/FeedbackController.java b/src/main/java/com/example/nexus/app/feedback/controller/FeedbackController.java index fcfb613e..ee23ad4c 100644 --- a/src/main/java/com/example/nexus/app/feedback/controller/FeedbackController.java +++ b/src/main/java/com/example/nexus/app/feedback/controller/FeedbackController.java @@ -81,7 +81,8 @@ public ResponseEntity> getMyFeedbackStatus @AuthenticationPrincipal CustomUserDetails userDetails ) { if (userDetails == null) { - throw new GeneralException(ErrorStatus.UNAUTHORIZED); + MyFeedbackStatusResponse response = MyFeedbackStatusResponse.notStarted(null); + return ResponseEntity.ok(ApiResponse.onSuccess(response)); } MyFeedbackStatusResponse response = feedbackService.getMyFeedbackStatus(postId, userDetails.getUserId()); diff --git a/src/main/java/com/example/nexus/app/feedback/controller/doc/FeedbackControllerDoc.java b/src/main/java/com/example/nexus/app/feedback/controller/doc/FeedbackControllerDoc.java index 68fba74c..38bdaaf6 100644 --- a/src/main/java/com/example/nexus/app/feedback/controller/doc/FeedbackControllerDoc.java +++ b/src/main/java/com/example/nexus/app/feedback/controller/doc/FeedbackControllerDoc.java @@ -76,8 +76,7 @@ ResponseEntity> generatePresignedUrl( @Operation( summary = "내 피드백 상태 조회", - description = "특정 프로젝트에 대한 내 피드백 상태를 조회합니다.", - security = @SecurityRequirement(name = "Bearer Authentication") + description = "특정 프로젝트에 대한 내 피드백 상태를 조회합니다. 비로그인 시에는 미작성 상태로 반환합니다." ) ResponseEntity> getMyFeedbackStatus( @Parameter(description = "프로젝트(게시글) ID") @RequestParam Long postId, diff --git a/src/main/java/com/example/nexus/app/global/security/SecurityConfig.java b/src/main/java/com/example/nexus/app/global/security/SecurityConfig.java index 2ece9f43..0adb4a08 100644 --- a/src/main/java/com/example/nexus/app/global/security/SecurityConfig.java +++ b/src/main/java/com/example/nexus/app/global/security/SecurityConfig.java @@ -41,6 +41,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { .requestMatchers("/api/v1/posts/**").permitAll() .requestMatchers("/api/v1/ranking/**").permitAll() .requestMatchers("/v1/users/posts/list").permitAll() + .requestMatchers("/v1/feedbacks/my-status").permitAll() .requestMatchers("/actuator/**").permitAll() .anyRequest().authenticated() )