🐛 Fix post get API missing the reference post

This commit is contained in:
2025-08-16 11:59:29 +08:00
parent e384763faf
commit 917e2d5393
3 changed files with 88 additions and 85 deletions

View File

@@ -144,6 +144,8 @@ public class PostController(
.Where(e => e.Slug == slug && e.Publisher.Name == publisherName)
.Include(e => e.Tags)
.Include(e => e.Categories)
.Include(e => e.RepliedPost)
.Include(e => e.ForwardedPost)
.FilterWithVisibility(currentUser, userFriends, userPublishers)
.FirstOrDefaultAsync();
if (post is null) return NotFound();
@@ -175,6 +177,8 @@ public class PostController(
.Include(e => e.Publisher)
.Include(e => e.Tags)
.Include(e => e.Categories)
.Include(e => e.RepliedPost)
.Include(e => e.ForwardedPost)
.FilterWithVisibility(currentUser, userFriends, userPublishers)
.FirstOrDefaultAsync();
if (post is null) return NotFound();