Embeddable funds

 Chat message embeddable poll
This commit is contained in:
2025-11-16 21:22:45 +08:00
parent 6252988390
commit 9b4f61fcda
10 changed files with 322 additions and 50 deletions

View File

@@ -680,6 +680,22 @@ public class PaymentService(
await db.SaveChangesAsync();
}
public async Task<SnWalletFund> GetWalletFundAsync(Guid fundId)
{
var fund = await db.WalletFunds
.Include(f => f.Recipients)
.ThenInclude(r => r.RecipientAccount)
.ThenInclude(a => a.Profile)
.Include(f => f.CreatorAccount)
.ThenInclude(a => a.Profile)
.FirstOrDefaultAsync(f => f.Id == fundId);
if (fund == null)
throw new InvalidOperationException("Fund not found");
return fund;
}
public async Task<WalletOverview> GetWalletOverviewAsync(Guid accountId, DateTime? startDate = null, DateTime? endDate = null)
{
var wallet = await wat.GetWalletAsync(accountId);