public async Task <IActionResult> UpdateComment([FromBody] IdeaCommentDto comment) { comment.OwnerId = _userIdentityProvider.GetUserId(); await _ideaCommentService.UpdateAsync(comment); return(Json(new { message = "Comment updated successfully" })); }
public async Task <IdeaCommentDto> CreateComment(string ideaId, [FromBody] IdeaCommentDto comment) { comment.IdeaId = ideaId; comment.OwnerId = _userIdentityProvider.GetUserId(); var createdComment = await _ideaCommentService.CreateAsync(comment); return(await _ideaCommentService.GetCommentAsync(createdComment.Id)); }
public Task <IdeaCommentDto> CreateAsync(IdeaCommentDto comment) { var command = new CreateIdeaCommentCommand(comment); _bus.SendCommand(command); return(GetCommentAsync(command.Comment.Id)); }
public IdeaCommentDeletedEvent(IdeaCommentDto ideaComment) { Comment = ideaComment; }
public IdeaCommentCreatedEvent(IdeaCommentDto ideaComment) { Comment = ideaComment; }
public IdeaCommentUpdatedEvent(IdeaCommentDto ideaComment) { Comment = ideaComment; }
public UpdateIdeaCommentCommand(IdeaCommentDto comment) { Comment= comment; }
public Task UpdateAsync(IdeaCommentDto comment) { var command = new UpdateIdeaCommentCommand(comment); return(_bus.SendCommand(command)); }
public CreateIdeaCommentCommand(IdeaCommentDto comment) { Comment = comment; }