Skip to content

Commit

Permalink
Integrate OrchardCMS#15560 (Set listpart in listpartviewmodel)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelPetrinolis committed Mar 30, 2024
1 parent 81158a9 commit 40c8a16
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Text.Json.Nodes;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Html;
using Microsoft.Extensions.DependencyInjection;
Expand Down Expand Up @@ -89,13 +90,13 @@ internal static JObject ConvertContentItem(ContentItem contentItem)
return o;
}

internal static JsonObject ConvertContentPart(ContentPart contentPart)
internal static JObject ConvertContentPart(ContentPart contentPart)
{
var o = new JsonObject
var o = new JObject
{
// Write all well-known properties.
[nameof(ContentPart.ContentItem)] = ConvertContentItem(contentPart.ContentItem),
[nameof(ContentPart.Content)] = JObject.FromObject(contentPart.Content),
new JProperty(nameof(ContentPart.ContentItem),ConvertContentItem(contentPart.ContentItem)),
new JProperty(nameof(ContentPart.Content),JObject.FromObject(contentPart.Content))
};

return o;
Expand Down

0 comments on commit 40c8a16

Please sign in to comment.