#467 cat editor
This commit is contained in:
parent
cd82f46b46
commit
08963054ee
@ -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>
|
||||
|
||||
|
||||
@ -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}");
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user