🐛 Fix first generated rewind didn't have account data

This commit is contained in:
2025-12-27 15:57:28 +08:00
parent fc61235d0c
commit 23c435e036
2 changed files with 18 additions and 4 deletions

View File

@@ -54,6 +54,14 @@ public class AccountService(
await cache.RemoveGroupAsync($"{AccountCachePrefix}{account.Id}");
}
public async Task<SnAccount?> GetAccount(Guid id)
{
return await db.Accounts
.Where(a => a.Id == id)
.Include(a => a.Profile)
.FirstOrDefaultAsync();
}
public async Task<SnAccount?> LookupAccount(string probe)
{
var account = await db.Accounts.Where(a => EF.Functions.ILike(a.Name, probe)).FirstOrDefaultAsync();