public async Task UpdateReplyAsync(SaveReplyModel model, Guid replyId) { var updateReplyModel = new UpdateReplyModel { Id = replyId, Content = model.Content, }; await _replyManager.UpdateReplyAsync(updateReplyModel); }
public async Task <Guid> AddReply(Guid commentId, SaveReplyModel model) { ArgumentGuard.NotEmpty(commentId, nameof(commentId)); ArgumentGuard.NotNull(model, nameof(model)); var comment = await _commentService.GetCommentAsync(commentId); // permission return(await _replyService.AddReplyAsync(commentId, model)); }
public async Task <Guid> AddReplyAsync(Guid commentId, SaveReplyModel model) { ArgumentGuard.NotEmpty(commentId, nameof(commentId)); ArgumentGuard.NotNull(model, nameof(model)); // validation, var replyEntity = new ReplyEntity { AuthorId = _userContext.UserId, CommentId = commentId, Content = model.Content, CreatedDateUtc = DateTime.UtcNow }; return(await _replyRepository.AddAsync(replyEntity)); }
public Task UpdateReply(Guid replyId, [FromBody] SaveReplyModel saveReplyModel) { return(_replyComposerService.UpdateReplyAsync(saveReplyModel, replyId)); }
public async Task <Guid> AddReply(Guid commentId, [FromBody] SaveReplyModel saveReplyModel) { return(await _replyManager.AddReply(commentId, saveReplyModel)); }