#199 adding coupletIndex to comment POST api body
This commit is contained in:
parent
729c6997b3
commit
fe3e755ef4
@ -178,7 +178,7 @@ namespace GanjooRazor.Pages
|
||||
|
||||
public async Task<ActionResult> OnPostReply(string replyCommentText, int refPoemId, int refCommentId)
|
||||
{
|
||||
return await OnPostComment(replyCommentText, refPoemId, refCommentId);
|
||||
return await OnPostComment(replyCommentText, refPoemId, refCommentId, 0);
|
||||
}
|
||||
|
||||
|
||||
@ -189,8 +189,9 @@ namespace GanjooRazor.Pages
|
||||
/// <param name="comment"></param>
|
||||
/// <param name="poemId"></param>
|
||||
/// <param name="inReplytoId"></param>
|
||||
/// <param name="coupletIndex"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<ActionResult> OnPostComment(string comment, int poemId, int inReplytoId)
|
||||
public async Task<ActionResult> OnPostComment(string comment, int poemId, int inReplytoId, int coupletIndex)
|
||||
{
|
||||
using (HttpClient secureClient = new HttpClient())
|
||||
{
|
||||
@ -204,7 +205,8 @@ namespace GanjooRazor.Pages
|
||||
{
|
||||
HtmlComment = comment,
|
||||
InReplyToId = inReplytoId == 0 ? null : inReplytoId,
|
||||
PoemId = poemId
|
||||
PoemId = poemId,
|
||||
CoupletIndex = coupletIndex == -1 ? null : coupletIndex
|
||||
}
|
||||
),
|
||||
Encoding.UTF8, "application/json");
|
||||
|
||||
@ -415,6 +415,7 @@
|
||||
<textarea name="comment" id="comment" class="inputTextarea editor" tabindex="4" rows="10" style="width:100%"></textarea>
|
||||
</div>
|
||||
<input type="hidden" name="poemId" id="poemId" value="@Model.GanjoorPage.Id" />
|
||||
<input type="hidden" name="coupletIndex" value="-1" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@ -19,5 +19,10 @@
|
||||
/// in reply to
|
||||
/// </summary>
|
||||
public int? InReplyToId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// couplet index - send null for unrelated to a couplet comment
|
||||
/// </summary>
|
||||
public int? CoupletIndex { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -5449,6 +5449,11 @@
|
||||
in reply to
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:RMuseum.Models.Ganjoor.ViewModels.GanjoorCommentPostViewModel.CoupletIndex">
|
||||
<summary>
|
||||
couplet index - send null for unrelated to a couplet comment
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:RMuseum.Models.Ganjoor.ViewModels.GanjoorCommentSummaryViewModel">
|
||||
<summary>
|
||||
GanjoorComment Summary View Model
|
||||
|
||||
Loading…
Reference in New Issue
Block a user