api/src/main/java/com/codechallenge/api/controller/BoatController.java
@DeleteMapping("/boats/{id}")
	  public Map<String, Boolean> deleteBoats(@PathVariable(value = "id") Long boatId) throws NoDataFoundException {
	    Boat boat =
	    		boatRepository
	            .findById(boatId)
	            .orElseThrow(() -> new NoDataFoundException(NO_DATA_FOUND_ERROR + boatId));
	
	    boatRepository.delete(boat);
	    Map<String, Boolean> response = new HashMap<>();
	    response.put("deleted", Boolean.TRUE);
	    return response;
	  }
/**
	   * Delete boat.
	   *
	   * @param boatId the boat id
	   * @return the map
	   * @throws NoDataFoundException
	   */
Delete boat.
@param boatId the boat id
@return the map
@throws NoDataFoundException
Delete boat . @param boatId the boat id @return the map @throws NoDataFoundException
@DeleteMapping("/boats/{id}")
	  public Map<String, Boolean> deleteBoats(@PathVariable(value = "id") Long boatId) throws NoDataFoundException {
	    Boat boat =
	    		boatRepository
	            .findById(boatId)
	            .orElseThrow(() -> new NoDataFoundException(NO_DATA_FOUND_ERROR + boatId));
	    boatRepository.delete(boat);
	    Map<String, Boolean> response = new HashMap<>();
	    response.put("deleted", Boolean.TRUE);
	    return response;
	  }
@ DeleteMapping ( "/boats/{id}" ) public Map < String , Boolean > deleteBoats ( @ PathVariable ( value = "id" ) Long boatId ) throws NoDataFoundException { Boat boat = boatRepository . findById ( boatId ) . orElseThrow ( ( ) -> new NoDataFoundException ( NO_DATA_FOUND_ERROR + boatId ) ) ; boatRepository . delete ( boat ) ; Map < String , Boolean > response = new HashMap < > ( ) ; response . put ( "deleted" , Boolean . TRUE ) ; return response ; }
Delete boat.
Delete boat .