コード例 #1
0
        public IActionResult AddUserReviewForPublication(int userId, int publicationId, [FromBody] ReviewInputModel body)
        {
            if (!ModelState.IsValid)
            {
                throw new ModelFormatException("Model not properly formatted");
            }
            var entity = _reviewService.AddUserReviewForPublication(userId, publicationId, body);

            return(CreatedAtRoute("GetReviewsByGivenUser", new { userId = entity.FriendId }, null));
        }