#24 simple sns: 포스트 삭제 api 구현
This commit is contained in:
@@ -35,4 +35,11 @@ public class PostController {
|
||||
|
||||
return Response.success(PostResponse.fromPost(post));
|
||||
}
|
||||
|
||||
@DeleteMapping("/{postId}")
|
||||
public Response<Void> delete(@PathVariable Integer postId,
|
||||
Authentication authentication) {
|
||||
postService.delete(authentication.getName(), postId);
|
||||
return Response.success();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user