Skip to content

Commit

Permalink
update PostController
Browse files Browse the repository at this point in the history
  • Loading branch information
unanchoi committed Apr 29, 2024
1 parent 6ba1aad commit acc5751
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ public ResponseEntity<Void> createPost(
return ResponseEntity.created(location).build();
}

@PatchMapping("{postId}")
@PatchMapping("/{postId}")
public ResponseEntity<Void> updatePost(
@PathVariable Long postId,
@RequestBody PostUpdateRequest request) {
postService.editContent(postId, request);
return ResponseEntity.noContent().build();
}

@DeleteMapping("{postId}")
@DeleteMapping("/{postId}")
public ResponseEntity<Void> deletePost(@PathVariable Long postId) {
postService.deleteById(postId);
return ResponseEntity.noContent().build();
Expand Down

0 comments on commit acc5751

Please sign in to comment.