Example #1
0
 /** DELETE /roles/:id -> delete the "id" role. */
 @RequestMapping(
     value = "/roles/{id}",
     method = RequestMethod.DELETE,
     produces = MediaType.APPLICATION_JSON_VALUE)
 @Timed
 public ResponseEntity<Void> deleteRole(@PathVariable Long id) {
   log.debug("REST request to delete Role : {}", id);
   roleRepository.delete(id);
   roleSearchRepository.delete(id);
   return ResponseEntity.ok()
       .headers(HeaderUtil.createEntityDeletionAlert("role", id.toString()))
       .build();
 }