Skip to content

Commit

Permalink
Change naming for dto
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua-Lester3 committed Dec 4, 2024
1 parent 3a9a1ca commit 9cf3dcd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion EssentialCSharp.Web/Services/SiteMappingDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
public class SiteMappingDto
{
public required int Level { get; set; }
public required List<string> Key { get; set; }
public required List<string> Keys { get; set; }
public required string Href { get; set; }
public required string Title { get; set; }
public required IEnumerable<SiteMappingDto> Items { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions EssentialCSharp.Web/Services/SiteMappingService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public IEnumerable<SiteMappingDto> GetTocData()
return new SiteMappingDto()
{
Level = 0,
Key = [firstX.Keys.First()],
Keys = [firstX.Keys.First()],
Href = $"{firstX.Keys.First()}#{firstX.AnchorId}",
Title = $"Chapter {x.Key}: {firstX.ChapterTitle}",
Items = GetItems(orderedX.Skip(1), 1)
Expand All @@ -42,7 +42,7 @@ private static IEnumerable<SiteMappingDto> GetItems(IEnumerable<SiteMapping> cha
.Select(i => new SiteMappingDto()
{
Level = indentLevel,
Key = i.Keys,
Keys = i.Keys,
Href = $"{i.Keys.First()}#{i.AnchorId}",
Title = i.RawHeading,
// Any children of this node will be /after/ this node,
Expand Down

0 comments on commit 9cf3dcd

Please sign in to comment.