diff --git a/GanjooRazor/Areas/User/Pages/ReportedComments.cshtml b/GanjooRazor/Areas/User/Pages/ReportedComments.cshtml index 48aefbd9..be571df6 100644 --- a/GanjooRazor/Areas/User/Pages/ReportedComments.cshtml +++ b/GanjooRazor/Areas/User/Pages/ReportedComments.cshtml @@ -35,7 +35,7 @@ else else color = "gray"; -
+

@report.ReasonCode

@@ -50,7 +50,7 @@ else @report.Comment.AuthorName در @report.Comment.CommentDate.ToFriendlyPersianDateTextify() دربارهٔ @report.Comment.Poem.Title

- ✓ درست می‌گوید + ✓ درست می‌گوید     گزارش نابجا ❌
diff --git a/GanjooRazor/Areas/User/Pages/ReportedComments.cshtml.cs b/GanjooRazor/Areas/User/Pages/ReportedComments.cshtml.cs index 0086c8e5..ee024638 100644 --- a/GanjooRazor/Areas/User/Pages/ReportedComments.cshtml.cs +++ b/GanjooRazor/Areas/User/Pages/ReportedComments.cshtml.cs @@ -144,27 +144,14 @@ namespace GanjooRazor.Areas.User.Pages return Page(); } - public async Task OnPostModerateComment(int id, string reasonCode, string reasonText) + public async Task OnPostModerateComment(int id) { using (HttpClient secureClient = new HttpClient()) { if (await GanjoorSessionChecker.PrepareClient(secureClient, Request, Response)) { - string reason; - switch(reasonCode) - { - case "offensive": - reason = "توهین آمیز است. " + reasonText; - break; - case "bogus": - reason = "نامفهوم است. " + reasonText; - break; - default: - reason = reasonText; - break; - } - var response = await secureClient.PostAsync($"{APIRoot.Url}/api/ganjoor/comment/moderate/{id}", new StringContent(JsonConvert.SerializeObject(reason), Encoding.UTF8, "application/json")); + var response = await secureClient.DeleteAsync($"{APIRoot.Url}/api/ganjoor/comment/reported/moderate/{id}"); if (response.StatusCode != HttpStatusCode.OK) { @@ -173,7 +160,7 @@ namespace GanjooRazor.Areas.User.Pages } } - return await OnGetAsync(); + return new OkResult(); } public async Task OnDeleteReport(int id) @@ -191,7 +178,7 @@ namespace GanjooRazor.Areas.User.Pages } } - return await OnGetAsync(); + return new OkResult(); } } } diff --git a/GanjooRazor/Pages/ReportComment.cshtml b/GanjooRazor/Pages/ReportComment.cshtml index dab36a74..8fbd4e46 100644 --- a/GanjooRazor/Pages/ReportComment.cshtml +++ b/GanjooRazor/Pages/ReportComment.cshtml @@ -78,6 +78,7 @@ لینک شکسته است.
تبلیغاتی است.
نامفهوم است.
+ فارسی ننوشته است.
دلیل دیگری دارم (کوتاه):
diff --git a/GanjooRazor/Pages/Shared/_Layout.cshtml b/GanjooRazor/Pages/Shared/_Layout.cshtml index b26e5f4f..3922c500 100644 --- a/GanjooRazor/Pages/Shared/_Layout.cshtml +++ b/GanjooRazor/Pages/Shared/_Layout.cshtml @@ -16,7 +16,7 @@