Exemplo n.º 1
0
        public void DownvoteComment(int id)
        {
            var token = HttpContext.Request.Cookies["user-token"];

            var             myprofile       = _profileRepository.GetUserByToken(token);
            CommentReaction commentReaction = new CommentReaction
            {
                UserId    = myprofile.Id,
                CommentId = id,
                Upvote    = false,
                AddedDate = DateTime.Now
            };

            _reactionRepository.AddCommentReaction(commentReaction);
        }