From 5d3bd1144df5720cc41264da243d37d3576f6397 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sat, 27 Dec 2025 14:48:32 +0800 Subject: [PATCH] :sparkles: The rewind point now brings account data --- DysonNetwork.Pass/Rewind/AccountRewindService.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/DysonNetwork.Pass/Rewind/AccountRewindService.cs b/DysonNetwork.Pass/Rewind/AccountRewindService.cs index 54b671d..d9bbb7f 100644 --- a/DysonNetwork.Pass/Rewind/AccountRewindService.cs +++ b/DysonNetwork.Pass/Rewind/AccountRewindService.cs @@ -70,6 +70,8 @@ public class AccountRewindService( var existingRewind = await db.RewindPoints .Where(p => p.AccountId == accountId && p.Year == currentYear) + .Include(p => p.Account) + .ThenInclude(p => p.Profile) .OrderBy(p => p.CreatedAt) .FirstOrDefaultAsync(); if (existingRewind is not null) return existingRewind; @@ -81,6 +83,8 @@ public class AccountRewindService( { var point = await db.RewindPoints .Where(p => p.SharableCode == code) + .Include(p => p.Account) + .ThenInclude(p => p.Profile) .OrderBy(p => p.CreatedAt) .FirstOrDefaultAsync(); return point; @@ -90,6 +94,8 @@ public class AccountRewindService( { var point = await db.RewindPoints .Where(p => p.AccountId == accountId && p.Year == year) + .Include(p => p.Account) + .ThenInclude(p => p.Profile) .OrderBy(p => p.CreatedAt) .FirstOrDefaultAsync(); if (point is null) throw new InvalidOperationException("No rewind point was found."); @@ -104,6 +110,8 @@ public class AccountRewindService( { var point = await db.RewindPoints .Where(p => p.AccountId == accountId && p.Year == year) + .Include(p => p.Account) + .ThenInclude(p => p.Profile) .OrderBy(p => p.CreatedAt) .FirstOrDefaultAsync(); if (point is null) throw new InvalidOperationException("No rewind point was found.");