✨ Chat room member managements
This commit is contained in:
@ -24,8 +24,6 @@ public class PostController(AppDatabase db, PostService ps, RelationshipService
|
||||
.CountAsync();
|
||||
var posts = await db.Posts
|
||||
.Include(e => e.Publisher)
|
||||
.Include(e => e.Publisher.Picture)
|
||||
.Include(e => e.Publisher.Background)
|
||||
.Include(e => e.ThreadedPost)
|
||||
.Include(e => e.ForwardedPost)
|
||||
.Include(e => e.Attachments)
|
||||
@ -54,8 +52,6 @@ public class PostController(AppDatabase db, PostService ps, RelationshipService
|
||||
var post = await db.Posts
|
||||
.Where(e => e.Id == id)
|
||||
.Include(e => e.Publisher)
|
||||
.Include(e => e.Publisher.Picture)
|
||||
.Include(e => e.Publisher.Background)
|
||||
.Include(e => e.RepliedPost)
|
||||
.Include(e => e.ThreadedPost)
|
||||
.Include(e => e.ForwardedPost)
|
||||
|
@ -22,7 +22,9 @@ public class Publisher : ModelBase
|
||||
[MaxLength(256)] public string Nick { get; set; } = string.Empty;
|
||||
[MaxLength(4096)] public string? Bio { get; set; }
|
||||
|
||||
public string? PictureId { get; set; }
|
||||
public CloudFile? Picture { get; set; }
|
||||
public string? BackgroundId { get; set; }
|
||||
public CloudFile? Background { get; set; }
|
||||
|
||||
[JsonIgnore] public ICollection<Post> Posts { get; set; } = new List<Post>();
|
||||
|
@ -20,8 +20,6 @@ public class PublisherController(AppDatabase db, PublisherService ps, FileServic
|
||||
|
||||
var publisher = await db.Publishers
|
||||
.Where(e => e.Name == name)
|
||||
.Include(e => e.Picture)
|
||||
.Include(e => e.Background)
|
||||
.FirstOrDefaultAsync();
|
||||
if (publisher is null) return NotFound();
|
||||
|
||||
|
Reference in New Issue
Block a user