Example #1
0
        public async Task <IActionResult> SetUserRating([FromBody] UserRating userRating)
        {
            try
            {
                await _ratingService.AddUserKeywordRatingAsync(userRating);

                return(Ok());
            }
            catch (Exception ex)
            {
                return(StatusCode(StatusCodes.Status500InternalServerError, new ErrorResponse
                {
                    Message = "Error occured while setting user keyword rating",
                    Exception = ex.Message,
                }));
            }
        }