From 7b7687704fe7270f028addf1524c62d019e74ef3 Mon Sep 17 00:00:00 2001 From: enjay27 Date: Fri, 11 Jun 2021 16:58:24 +0900 Subject: [PATCH] =?UTF-8?q?[#14]fix:=20=EA=B2=8C=EC=8B=9C=EA=B8=80=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C=20URI=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/devin/dev/controller/post/PostController.java | 2 +- src/test/java/com/devin/dev/mvc/PostControllerTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/devin/dev/controller/post/PostController.java b/src/main/java/com/devin/dev/controller/post/PostController.java index 7e1f4b6..e40658d 100644 --- a/src/main/java/com/devin/dev/controller/post/PostController.java +++ b/src/main/java/com/devin/dev/controller/post/PostController.java @@ -41,7 +41,7 @@ public DefaultResponse getPostListByCondition(PostSearchCondition condition, return postService.getPostInfoListByCondition(condition, pageable); } - @DeleteMapping("/postlist/{id}") + @DeleteMapping("/post/{id}") public DefaultResponse deletePost(@PathVariable("id") Long postId) { return postService.deletePost(postId); } diff --git a/src/test/java/com/devin/dev/mvc/PostControllerTest.java b/src/test/java/com/devin/dev/mvc/PostControllerTest.java index fc1b3f5..a5fd747 100644 --- a/src/test/java/com/devin/dev/mvc/PostControllerTest.java +++ b/src/test/java/com/devin/dev/mvc/PostControllerTest.java @@ -52,7 +52,7 @@ void requestPostFailed() throws Exception { @WithMockUser void requestDeleteSucceeded() throws Exception { List posts = postRepository.findByTitle("title_2"); - mvc.perform(delete("/postlist/" + posts.get(0).getId())) + mvc.perform(delete("/post/" + posts.get(0).getId())) .andDo(print()); } } \ No newline at end of file