Exemple #1
0
 public UpdateTextCommentWork(ResourceRepository resourceRepository, long commentId, UpdateTextCommentContract data, int userId) : base(resourceRepository)
 {
     m_resourceRepository = resourceRepository;
     m_commentId          = commentId;
     m_data   = data;
     m_userId = userId;
 }
Exemple #2
0
        public IActionResult UpdateComment(long commentId, [FromBody] UpdateTextCommentContract request)
        {
            m_authorizationManager.AuthorizeTextComment(commentId, PermissionFlag.EditProject);

            try
            {
                m_projectContentManager.UpdateComment(commentId, request);
                return(Ok());
            }
            catch (HttpErrorCodeException exception)
            {
                return(StatusCode((int)exception.StatusCode, exception.Message));
            }
        }
        public void UpdateComment(long commentId, UpdateTextCommentContract data)
        {
            var userId = m_authenticationManager.GetCurrentUserId();

            new UpdateTextCommentWork(m_resourceRepository, commentId, data, userId).Execute();
        }