From f5fb133e99f15107a377e7c4900b6a03d4e214be Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Mon, 2 Jun 2025 02:56:58 +0800 Subject: [PATCH] :bug: Fix again for included non-exists anymore attachments field --- DysonNetwork.Sphere/Account/AccountCurrentController.cs | 2 -- DysonNetwork.Sphere/Post/PostController.cs | 2 -- DysonNetwork.Sphere/Publisher/PublisherController.cs | 2 -- 3 files changed, 6 deletions(-) diff --git a/DysonNetwork.Sphere/Account/AccountCurrentController.cs b/DysonNetwork.Sphere/Account/AccountCurrentController.cs index b681b93..b96131e 100644 --- a/DysonNetwork.Sphere/Account/AccountCurrentController.cs +++ b/DysonNetwork.Sphere/Account/AccountCurrentController.cs @@ -77,8 +77,6 @@ public class AccountCurrentController( var profile = await db.AccountProfiles .Where(p => p.Account.Id == userId) - .Include(profile => profile.Background) - .Include(profile => profile.Picture) .FirstOrDefaultAsync(); if (profile is null) return BadRequest("Unable to get your account."); diff --git a/DysonNetwork.Sphere/Post/PostController.cs b/DysonNetwork.Sphere/Post/PostController.cs index 7e650ce..273ba3a 100644 --- a/DysonNetwork.Sphere/Post/PostController.cs +++ b/DysonNetwork.Sphere/Post/PostController.cs @@ -297,8 +297,6 @@ public class PostController( 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.Categories) .Include(e => e.Tags) .FirstOrDefaultAsync(); diff --git a/DysonNetwork.Sphere/Publisher/PublisherController.cs b/DysonNetwork.Sphere/Publisher/PublisherController.cs index a513856..aeb8d44 100644 --- a/DysonNetwork.Sphere/Publisher/PublisherController.cs +++ b/DysonNetwork.Sphere/Publisher/PublisherController.cs @@ -93,8 +93,6 @@ namespace DysonNetwork.Sphere.Publisher; var publisher = await db.Publishers .Where(p => p.Name == name) - .Include(publisher => publisher.Picture) - .Include(publisher => publisher.Background) .FirstOrDefaultAsync(); if (publisher is null) return NotFound();