public void updateWidgetComment(@PathVariable long widgetId,
@PathVariable long widgetCommentId,
@RequestParam String text,
HttpServletResponse response) {
WidgetComment widgetComment = widgetCommentService.getWidgetComment(widgetCommentId);
if (widgetComment == null) {
widgetComment = new WidgetComment();
widgetComment.setWidgetId(widgetId);
widgetComment.setUser(userService.getAuthenticatedUser());
widgetComment.setCreatedDate(new Date());
widgetComment.setLastModifiedDate(new Date());
}
widgetComment.setText(text);
widgetCommentService.saveWidgetComment(widgetComment);
response.setStatus(HttpStatus.NO_CONTENT.value());
}