[backend/api] Add like and renote count to NoteBase schema
This commit is contained in:
parent
156735f40b
commit
3bb3ac785e
2 changed files with 5 additions and 1 deletions
|
@ -72,7 +72,9 @@ public class NoteRenderer(UserRenderer userRenderer, DatabaseContext db, EmojiSe
|
||||||
Visibility = RenderVisibility(note.Visibility),
|
Visibility = RenderVisibility(note.Visibility),
|
||||||
User = noteUser,
|
User = noteUser,
|
||||||
Attachments = attachments.ToList(),
|
Attachments = attachments.ToList(),
|
||||||
Reactions = reactions.ToList()
|
Reactions = reactions.ToList(),
|
||||||
|
Likes = note.LikeCount,
|
||||||
|
Renotes = note.RenoteCount
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,8 @@ public class NoteBase
|
||||||
[J("text")] public required string? Text { get; set; }
|
[J("text")] public required string? Text { get; set; }
|
||||||
[J("cw")] public required string? Cw { get; set; }
|
[J("cw")] public required string? Cw { get; set; }
|
||||||
[J("visibility")] public required string Visibility { get; set; }
|
[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("user")] public required UserResponse User { get; set; }
|
[J("user")] public required UserResponse User { get; set; }
|
||||||
[J("attachments")] public required List<NoteAttachment> Attachments { get; set; }
|
[J("attachments")] public required List<NoteAttachment> Attachments { get; set; }
|
||||||
[J("reactions")] public required List<NoteReactionSchema> Reactions { get; set; }
|
[J("reactions")] public required List<NoteReactionSchema> Reactions { get; set; }
|
||||||
|
|
Loading…
Add table
Reference in a new issue