#24 simple sns: 포스트 삭제 api 구현

This commit is contained in:
haerong22
2022-11-13 22:01:35 +09:00
parent c590acced2
commit d4458cc646

View File

@@ -35,4 +35,11 @@ public class PostController {
return Response.success(PostResponse.fromPost(post)); 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();
}
} }