Almost finish implementing client side
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
namespace T120B165_ImgBoard.Dtos.Comment;
|
||||
|
||||
public record CommentDto(int Id, string Text, SlimUserDto Author)
|
||||
public record CommentDto(int Id, string Text, SlimUserDto Author, DateTime CreatedAt)
|
||||
{
|
||||
public static CommentDto FromComment(Models.Comment comment)
|
||||
{
|
||||
return new CommentDto(
|
||||
Id: comment.Id,
|
||||
Text: comment.Text,
|
||||
Author: SlimUserDto.FromUser(comment.Author)
|
||||
Author: SlimUserDto.FromUser(comment.Author),
|
||||
CreatedAt: comment.Created
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user