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); }