This commit is contained in:
max
2025-09-03 23:04:02 +02:00
parent 4bee6e6d35
commit dd19fc27d9
4 changed files with 5 additions and 6 deletions

View File

@@ -1,6 +1,4 @@
@page "/Accounts"
<PageTitle>Accounts</PageTitle>
@code {
}

View File

@@ -4,4 +4,5 @@ namespace Manager.App.Components.Pages;
public partial class Accounts : ComponentBase
{
}

View File

@@ -50,12 +50,12 @@ public class LibraryService : ILibraryService
}
}
public async Task<Result<List<ClientAccountEntity>>> GetAccountsAsync(int total = 20, int offset = 0, CancellationToken cancellationToken = default)
public async Task<Result<List<ChannelEntity>>> GetAccountsAsync(int total = 20, int offset = 0, CancellationToken cancellationToken = default)
{
try
{
await using var context = await _dbContextFactory.CreateDbContextAsync(cancellationToken);
var orderedAccounts = context.Accounts.OrderBy(x => x.Id).Skip(offset).Take(total);
var orderedAccounts = context.Channels.Include(x => x.ClientAccount).Where(x => x.ClientAccount != null).OrderBy(x => x.Id).Skip(offset).Take(total);
return orderedAccounts.ToList();
}
catch (Exception e)

View File

@@ -15,7 +15,7 @@ public class ClientManager : BackgroundService
_cancellationToken = stoppingToken;
stoppingToken.Register(CancellationRequested);
}
private void CancellationRequested()
{
// Clear up