@RequestMapping( value = "/deleteVotes", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON) public ResponseEntity<String> deleteVotes() { initService.deleteVotes(); return new ResponseEntity<>("Votes deleted successfully.", HttpStatus.OK); }
@RequestMapping( value = "/init", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON) public ResponseEntity<InitDTO> init() { try { return new ResponseEntity<>(initService.initDatabase(false), HttpStatus.OK); } catch (RestClientException exception) { LOGGER.warn("Can't init", exception); return new ResponseEntity<>(new InitDTO(), HttpStatus.BAD_REQUEST); } }