docs: #283 delete song bug fix

This commit is contained in:
Hamid Reza Mohammadi 2022-02-20 19:47:56 +03:30
parent c4aa1b40dd
commit 68b3ddb43f
2 changed files with 13 additions and 4 deletions

View File

@ -146,19 +146,28 @@ else
</tr>
<tr>
<td>
<button type="submit" name="approve" id="approve" style="width:100%;color:white;background-color:green">اصلاح</button>
<button type="submit" name="approve" id="approve" style="width:100%;color:white;background-color:green">
@if (Model.EditMode)
{
<text>اصلاح</text>
}
else
{
<text>تأیید</text>
}
</button>
</td>
<td>
<table style="width:100%" class="noborder">
@if (Model.EditMode)
{
<tr>
<tr>
<td>
<button type="submit" name="delsong" id="delsong" style="width:100%;color:white;background-color:darkred">حذف</button>
</td>
</tr>
}
else
{

View File

@ -167,7 +167,7 @@ namespace GanjooRazor.Areas.User.Pages
}
else
{
var delResponse = await secureClient.DeleteAsync($"{APIRoot.Url}/api/ganjoor/song?id={string.IsNullOrEmpty(Request.Query["id"])}");
var delResponse = await secureClient.DeleteAsync($"{APIRoot.Url}/api/ganjoor/song?id={Request.Query["id"]}");
if (!delResponse.IsSuccessStatusCode)
{
LastError = JsonConvert.DeserializeObject<string>(await delResponse.Content.ReadAsStringAsync());