This commit is contained in:
Hamid Reza Mohammadi 2025-03-21 13:54:16 +03:30
parent cd82f46b46
commit 08963054ee
2 changed files with 3 additions and 7 deletions

View File

@ -84,7 +84,7 @@
<tr>
<td colspan="2" class="td-button-container">
<a role="button" id="deletecorrections" class="editor-button background-red" onclick="deletePoemCorrections(@Model.PageInformation.PoetOrCat.Cat.Id)">انصراف و حذف این ویرایش</a>
<a role="button" id="deletecorrections" class="editor-button background-red" onclick="deleteCatCorrection(@Model.PageInformation.PoetOrCat.Cat.Id)">انصراف و حذف این ویرایش</a>
</td>
</tr>

View File

@ -47,7 +47,7 @@ namespace GanjooRazor.Areas.User.Pages
if (string.IsNullOrEmpty(Request.Cookies["Token"]))
return Redirect("/");
FatalError = "";
FatalError = Request.Query["FatalError"];
using (HttpClient secureClient = new HttpClient())
{
if (await GanjoorSessionChecker.PrepareClient(secureClient, Request, Response))
@ -145,10 +145,6 @@ namespace GanjooRazor.Areas.User.Pages
{
FatalError = JsonConvert.DeserializeObject<string>(await response.Content.ReadAsStringAsync());
}
else
{
MyLastEdit = JsonConvert.DeserializeObject<GanjoorCatCorrectionViewModel>(await response.Content.ReadAsStringAsync());
}
}
else
{
@ -162,7 +158,7 @@ namespace GanjooRazor.Areas.User.Pages
FatalError = exp.ToString();
}
return Page();
return Redirect($"/User/CatEditor?id={Request.Query["id"]}&FatalError={FatalError}");
}