🐛 Fix publisher member has no account in response

This commit is contained in:
LittleSheep 2025-06-28 18:40:20 +08:00
parent b0b7afd6b3
commit 38243f9eba
2 changed files with 7 additions and 7 deletions

View File

@ -60,7 +60,7 @@ public class PublisherMember : ModelBase
public Guid PublisherId { get; set; }
[JsonIgnore] public Publisher Publisher { get; set; } = null!;
public Guid AccountId { get; set; }
[JsonIgnore] public Account.Account Account { get; set; } = null!;
public Account.Account Account { get; set; } = null!;
public PublisherMemberRole Role { get; set; } = PublisherMemberRole.Viewer;
public Instant? JoinedAt { get; set; }

View File

@ -455,7 +455,7 @@ public class PublisherController(
.Where(m => m.PublisherId == publisher.Id)
.Where(m => m.JoinedAt != null)
.Include(m => m.Account)
.Include(m => m.Account.Profile);
.ThenInclude(m => m.Profile);
var total = await query.CountAsync();
Response.Headers["X-Total"] = total.ToString();