Esempio n. 1
0
        public IActionResult ApproveComment(Guid postid, Guid commentid)
        {
            CommentSaveState state = _blogManager.ApproveComment(postid.ToString(), commentid.ToString());

            if (state == CommentSaveState.Failed)
            {
                return(StatusCode(500));
            }

            if (state == CommentSaveState.NotFound)
            {
                return(NotFound());
            }

            return(Ok());
        }
Esempio n. 2
0
        public IActionResult ApproveComment(Guid postid, Guid commentid)
        {
            var state = blogManager.ApproveComment(postid.ToString(), commentid.ToString());

            if (state == NBR.CommentSaveState.Failed)
            {
                return(StatusCode(500));
            }

            if (state == NBR.CommentSaveState.NotFound)
            {
                return(NotFound());
            }

            logger.LogInformation(new EventDataItem(EventCodes.CommentApproved, null, "Comment approved on: {0}", postid.ToString()));

            BreakSiteCache();

            return(Ok());
        }