Exemplo n.º 1
0
 @RequestMapping(value = "/remove_comment", method = RequestMethod.POST)
 public ResponseEntity removeComment(@RequestBody Long commentId) {
   if (commentService.findComment(commentId).getAuthor().getId() == User.getCurrentUserId())
     commentService.removeComment(commentId);
   return new ResponseEntity(HttpStatus.OK);
 }