This commit is contained in:
john 2025-08-10 19:57:47 +02:00
parent cbf67bf5f1
commit ce3888f1ab
15 changed files with 162 additions and 21 deletions

View file

@ -10,7 +10,8 @@ public record PostDto(
IEnumerable<PostMediaDto> Media,
IEnumerable<PostReactionDto> Reactions,
DateTimeOffset CreatedAt,
IEnumerable<string> PossibleReactions
IEnumerable<string> PossibleReactions,
IEnumerable<PostCommentDto> Comments
)
{
public static PostDto FromModel(Modules.Blog.Application.Queries.GetPosts.Dto.PostDto post) =>
@ -21,6 +22,7 @@ public record PostDto(
post.Media.Select(m => new PostMediaDto(m.Url, m.Width, m.Height)),
post.Reactions.Select(r => new PostReactionDto(r.Emoji, r.AuthorName, r.ReactedOn)),
post.CreatedAt,
post.PossibleReactions
post.PossibleReactions,
post.Comments.Select(c => new PostCommentDto(c.Author, c.Content, c.PostedOn))
);
}
}