public void setWidgetRating(@PathVariable String widgetId,
@RequestParam(value = "score") Integer score,
HttpServletResponse response) {
logger.debug("POST WidgetRating received for /api/rest/widgets/{} score: {}", widgetId, score);
WidgetRating widgetRating = new WidgetRatingImpl();
widgetRating.setScore(score);
widgetRating.setUserId(userService.getAuthenticatedUser().getId());
widgetService.saveWidgetRating(widgetId, widgetRating);
// send a 204 back for success since there is no content being returned
response.setStatus(HttpStatus.NO_CONTENT.value());
}