Ejemplo n.º 1
0
        public IActionResult EditTicket(int id, Comment comment)
        {
            Comment existingComment = _commentData.GetComment(id);

            if (existingComment != null)
            {
                comment.CommentId = existingComment.CommentId;
                comment.TicketId  = existingComment.TicketId;
                comment.UserId    = existingComment.UserId;

                _commentData.EditComment(comment);
                return(Ok());
            }

            return(NotFound($"Comment with Guid of {comment.CommentId} does not exist"));
        }