🐛 Fix publisher member has no account in response
This commit is contained in:
parent
b0b7afd6b3
commit
38243f9eba
@ -26,10 +26,10 @@ public class Publisher : ModelBase, IIdentifiedResource
|
|||||||
// Outdated fields, for backward compability
|
// Outdated fields, for backward compability
|
||||||
[MaxLength(32)] public string? PictureId { get; set; }
|
[MaxLength(32)] public string? PictureId { get; set; }
|
||||||
[MaxLength(32)] public string? BackgroundId { get; set; }
|
[MaxLength(32)] public string? BackgroundId { get; set; }
|
||||||
|
|
||||||
[Column(TypeName = "jsonb")] public CloudFileReferenceObject? Picture { get; set; }
|
[Column(TypeName = "jsonb")] public CloudFileReferenceObject? Picture { get; set; }
|
||||||
[Column(TypeName = "jsonb")] public CloudFileReferenceObject? Background { get; set; }
|
[Column(TypeName = "jsonb")] public CloudFileReferenceObject? Background { get; set; }
|
||||||
|
|
||||||
[Column(TypeName = "jsonb")] public Account.VerificationMark? Verification { get; set; }
|
[Column(TypeName = "jsonb")] public Account.VerificationMark? Verification { get; set; }
|
||||||
|
|
||||||
[JsonIgnore] public ICollection<Post.Post> Posts { get; set; } = new List<Post.Post>();
|
[JsonIgnore] public ICollection<Post.Post> Posts { get; set; } = new List<Post.Post>();
|
||||||
@ -60,7 +60,7 @@ public class PublisherMember : ModelBase
|
|||||||
public Guid PublisherId { get; set; }
|
public Guid PublisherId { get; set; }
|
||||||
[JsonIgnore] public Publisher Publisher { get; set; } = null!;
|
[JsonIgnore] public Publisher Publisher { get; set; } = null!;
|
||||||
public Guid AccountId { get; set; }
|
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 PublisherMemberRole Role { get; set; } = PublisherMemberRole.Viewer;
|
||||||
public Instant? JoinedAt { get; set; }
|
public Instant? JoinedAt { get; set; }
|
||||||
@ -91,7 +91,7 @@ public class PublisherFeature : ModelBase
|
|||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
[MaxLength(1024)] public string Flag { get; set; } = null!;
|
[MaxLength(1024)] public string Flag { get; set; } = null!;
|
||||||
public Instant? ExpiredAt { get; set; }
|
public Instant? ExpiredAt { get; set; }
|
||||||
|
|
||||||
public Guid PublisherId { get; set; }
|
public Guid PublisherId { get; set; }
|
||||||
public Publisher Publisher { get; set; } = null!;
|
public Publisher Publisher { get; set; } = null!;
|
||||||
}
|
}
|
||||||
|
@ -455,7 +455,7 @@ public class PublisherController(
|
|||||||
.Where(m => m.PublisherId == publisher.Id)
|
.Where(m => m.PublisherId == publisher.Id)
|
||||||
.Where(m => m.JoinedAt != null)
|
.Where(m => m.JoinedAt != null)
|
||||||
.Include(m => m.Account)
|
.Include(m => m.Account)
|
||||||
.Include(m => m.Account.Profile);
|
.ThenInclude(m => m.Profile);
|
||||||
|
|
||||||
var total = await query.CountAsync();
|
var total = await query.CountAsync();
|
||||||
Response.Headers["X-Total"] = total.ToString();
|
Response.Headers["X-Total"] = total.ToString();
|
||||||
@ -468,4 +468,4 @@ public class PublisherController(
|
|||||||
|
|
||||||
return Ok(members);
|
return Ok(members);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user