@RequestMapping(value = "/deleteRow", method = RequestMethod.POST) public ResponseEntity<Boolean> deleteRow( @RequestParam(value = "username") String username, @RequestParam(value = "hash") String hash, @RequestParam(value = "target") String target, HttpServletRequest request) { logger.info("Requested deletion of row with hash " + hash + " and target " + target); boolean accepted = false; if (username != null && !username.equals("") && hash != null && !hash.equals("") && target != null && !target.equals("")) { shortURLRepositoryExtended.deleteByHash(username, hash, target); accepted = true; } if (accepted) { return new ResponseEntity<>(accepted, HttpStatus.ACCEPTED); } else { return new ResponseEntity<>(HttpStatus.BAD_REQUEST); } }