From 0ea10405e6aabcc4c5a8846087776e6ffa9e0f35 Mon Sep 17 00:00:00 2001 From: Jack Date: Fri, 16 Jan 2026 18:21:53 +0900 Subject: [PATCH] =?UTF-8?q?fix/#205:=20/v1/feedbacks/my-status=20401=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nexus/app/feedback/controller/FeedbackController.java | 3 ++- .../app/feedback/controller/doc/FeedbackControllerDoc.java | 3 +-- .../com/example/nexus/app/global/security/SecurityConfig.java | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) 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() )