Skip to content

Commit

Permalink
[J2KB-3rd-Season#14]fix: 게시글 삭제 URI 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
enjay27 committed Jun 11, 2021
1 parent bf9639c commit 7b76877
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public DefaultResponse<?> getPostListByCondition(PostSearchCondition condition,
return postService.getPostInfoListByCondition(condition, pageable);
}

@DeleteMapping("/postlist/{id}")
@DeleteMapping("/post/{id}")
public DefaultResponse<PostDetailsDto> deletePost(@PathVariable("id") Long postId) {
return postService.deletePost(postId);
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/devin/dev/mvc/PostControllerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void requestPostFailed() throws Exception {
@WithMockUser
void requestDeleteSucceeded() throws Exception {
List<Post> posts = postRepository.findByTitle("title_2");
mvc.perform(delete("/postlist/" + posts.get(0).getId()))
mvc.perform(delete("/post/" + posts.get(0).getId()))
.andDo(print());
}
}

0 comments on commit 7b76877

Please sign in to comment.