From c4f4e031ad886ee4a117a8c0b4a1f69b97a713bd Mon Sep 17 00:00:00 2001 From: minyeong <106754293+miinyeong@users.noreply.github.com> Date: Tue, 28 Nov 2023 11:23:27 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20viewComment=20API=20(Post=20->=20Get=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../server/controller/comment/CommentController.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/onestep/server/controller/comment/CommentController.java b/src/main/java/com/onestep/server/controller/comment/CommentController.java index 1f402e7..60d3ac9 100644 --- a/src/main/java/com/onestep/server/controller/comment/CommentController.java +++ b/src/main/java/com/onestep/server/controller/comment/CommentController.java @@ -4,10 +4,7 @@ import com.onestep.server.entity.comment.WriteCommentDto; import com.onestep.server.service.comment.CommentService; import lombok.RequiredArgsConstructor; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.List; @@ -22,7 +19,7 @@ public String writeComment(@RequestBody WriteCommentDto writeCommentDto){ return commentService.writeComment(writeCommentDto); } - @PostMapping("/comment/viewComment/{answerId}") + @GetMapping("/comment/viewComment/{answerId}") public List viewComment(@PathVariable Long answerId){ return commentService.viewComment(answerId); }