[CHANGE]
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
@page "/Accounts"
|
||||
|
||||
<PageTitle>Accounts</PageTitle>
|
||||
|
||||
@code {
|
||||
|
||||
}
|
@@ -4,4 +4,5 @@ namespace Manager.App.Components.Pages;
|
||||
|
||||
public partial class Accounts : ComponentBase
|
||||
{
|
||||
|
||||
}
|
@@ -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)
|
||||
|
@@ -15,7 +15,7 @@ public class ClientManager : BackgroundService
|
||||
_cancellationToken = stoppingToken;
|
||||
stoppingToken.Register(CancellationRequested);
|
||||
}
|
||||
|
||||
|
||||
private void CancellationRequested()
|
||||
{
|
||||
// Clear up
|
||||
|
Reference in New Issue
Block a user