diff --git a/GanjooRazor/Pages/Index.cshtml.cs b/GanjooRazor/Pages/Index.cshtml.cs index a25a5c08..2d1edb72 100644 --- a/GanjooRazor/Pages/Index.cshtml.cs +++ b/GanjooRazor/Pages/Index.cshtml.cs @@ -178,7 +178,7 @@ namespace GanjooRazor.Pages public async Task 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 /// /// /// + /// /// - public async Task OnPostComment(string comment, int poemId, int inReplytoId) + public async Task 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"); diff --git a/GanjooRazor/Pages/_GanjoorPagePartial.cshtml b/GanjooRazor/Pages/_GanjoorPagePartial.cshtml index c1cfaedd..d22fb98b 100644 --- a/GanjooRazor/Pages/_GanjoorPagePartial.cshtml +++ b/GanjooRazor/Pages/_GanjoorPagePartial.cshtml @@ -415,6 +415,7 @@ + diff --git a/RMuseum/Models/Ganjoor/ViewModels/GanjoorCommentPostViewModel.cs b/RMuseum/Models/Ganjoor/ViewModels/GanjoorCommentPostViewModel.cs index 12fa9e2f..35f82e01 100644 --- a/RMuseum/Models/Ganjoor/ViewModels/GanjoorCommentPostViewModel.cs +++ b/RMuseum/Models/Ganjoor/ViewModels/GanjoorCommentPostViewModel.cs @@ -19,5 +19,10 @@ /// in reply to /// public int? InReplyToId { get; set; } + + /// + /// couplet index - send null for unrelated to a couplet comment + /// + public int? CoupletIndex { get; set; } } } diff --git a/RMuseum/RMuseum.xml b/RMuseum/RMuseum.xml index 8a155dbe..b9a108e4 100644 --- a/RMuseum/RMuseum.xml +++ b/RMuseum/RMuseum.xml @@ -5449,6 +5449,11 @@ in reply to + + + couplet index - send null for unrelated to a couplet comment + + GanjoorComment Summary View Model