class VulnerabilityController implements Constants {

	@RequestMapping(path = "/v1/vulnerabilities/trend/notes", method = RequestMethod.POST)
	public ResponseEntity<Object> createTrendAnnotation(@RequestBody(required = true) TrendNote request) {

		try {
			if (vulnerabilityService.createTrendAnnotation(request)) {
				return ResponseUtils.buildSucessResponse("Annotation created");
			} else {
				return ResponseUtils.buildFailureResponse(new Exception("Annotation creation failed"));
			}
		} catch (JsonProcessingException e) {
			LOGGER.error("Error in createTrendAnnotation ", e);
			return ResponseUtils.buildFailureResponse(e);
		}
	}

}