public ActionResult RequestVerification([FromJson] ArtistContract selectedArtist, string message, string linkToProof, bool privateMessage) { if (selectedArtist == null) { TempData.SetErrorMessage("Artist must be selected"); return(View("RequestVerification", null, message)); } if (string.IsNullOrEmpty(linkToProof) && !privateMessage) { TempData.SetErrorMessage("You must provide a link to proof"); return(View()); } if (string.IsNullOrEmpty(linkToProof) && privateMessage) { linkToProof = "in a private message"; } var fullMessage = "Proof: " + linkToProof + ", Message: " + message; artistQueries.CreateReport(selectedArtist.Id, ArtistReportType.OwnershipClaim, Hostname, string.Format("Account verification request: {0}", fullMessage), null); TempData.SetSuccessMessage("Request sent"); return(View()); }
private (bool created, ArtistReport report) CallCreateReport(ArtistReportType reportType, int?versionNumber = null, Artist artist = null) { artist ??= _artist; var result = _queries.CreateReport(artist.Id, reportType, "39.39.39.39", "It's Miku, not Rin", versionNumber); var report = _repository.Load <ArtistReport>(result.reportId); return(result.created, report); }
public ActionResult RequestVerification([FromJson] ArtistContract selectedArtist, string message) { if (selectedArtist == null) { TempData.SetErrorMessage("Artist must be selected"); return(View("RequestVerification", null, message)); } if (string.IsNullOrEmpty(message)) { TempData.SetErrorMessage("You must enter some message"); return(View()); } artistQueries.CreateReport(selectedArtist.Id, ArtistReportType.OwnershipClaim, Hostname, string.Format("Account verification request: {0}", message), null); TempData.SetSuccessMessage("Request sent"); return(View()); }
public void CreateReport(int artistId, ArtistReportType reportType, string notes, int?versionNumber) { queries.CreateReport(artistId, reportType, WebHelper.GetRealHost(Request), notes ?? string.Empty, versionNumber); }