示例#1
0
        public async Task <IHttpActionResult> AddComment(string videoId, string userId, string commentText)
        {
            try
            {
                var video = await _videoService.AddComment(videoId, userId, commentText);

                return(video == null?NotFound() : (IHttpActionResult)Ok(video));
            }
            catch (InvalidOperationException ex)
            {
                return(InternalServerError(ex));
            }
        }