Comment Controller
@RestController
@RequestMapping(value = ["/api/v1/articles/{articleId}/comments" ] )
Functions
Link copied to clipboard
@PostMapping
@PreAuthorize(value = "isAuthenticated()" )
@ResponseStatus(value = HttpStatus.CREATED )
Link copied to clipboard
@DeleteMapping(value = ["/{commentId}" ] )
@PreAuthorize(value = "isAuthenticated() and @commentValidator.isAuthor(#articleId, #commentId, #userDetails.username)" )
Link copied to clipboard
@PatchMapping(value = ["/{commentId}" ] )
@PreAuthorize(value = "isAuthenticated() and @commentValidator.isAuthor(#articleId, #commentId, #userDetails.username)" )