public ReportResponse Report(ReportModel reportModel) { var comment = _session.Get<Comment>(reportModel.CommentId); if (comment == null) { return new ReportResponse { Type = CommentResponseType.Error, Message = "Could not find comment to report, it may have already been deleted" }; } EventContext.Instance.Publish<IOnCommentReported, CommentReportedEventArgs>( new CommentReportedEventArgs(comment)); return new ReportResponse { Type = CommentResponseType.Info, Message = "The comment has been reported, and will be dealt with by site admin", RedirectUrl = "~/"+ comment.Webpage.LiveUrlSegment }; }
public ActionResult Report(ReportModel reportModel) { var response = _commentReportingUiService.Report(reportModel); return RedirectToPage(response); }