[backend/api] Add replies count to NoteBase schema

This commit is contained in:
Laura Hausmann 2024-04-20 01:16:40 +02:00
parent 3bb3ac785e
commit 0784425f6d
No known key found for this signature in database
GPG key ID: D044E84C5BE01605
2 changed files with 3 additions and 1 deletions

View file

@ -74,7 +74,8 @@ public class NoteRenderer(UserRenderer userRenderer, DatabaseContext db, EmojiSe
Attachments = attachments.ToList(),
Reactions = reactions.ToList(),
Likes = note.LikeCount,
Renotes = note.RenoteCount
Renotes = note.RenoteCount,
Replies = note.RepliesCount
};
}

View file

@ -37,6 +37,7 @@ public class NoteBase
[J("visibility")] public required string Visibility { get; set; }
[J("likes")] public required int Likes { get; set; }
[J("renotes")] public required int Renotes { get; set; }
[J("replies")] public required int Replies { get; set; }
[J("user")] public required UserResponse User { get; set; }
[J("attachments")] public required List<NoteAttachment> Attachments { get; set; }
[J("reactions")] public required List<NoteReactionSchema> Reactions { get; set; }