Refactor AdminUserEndpoints and MediaEndpoints to include default parameter values for pagination and filtering, improving API usability. Update ManualInboxDialog to enhance show selection logic with auto-detection based on file names, and improve user feedback with new translations. Refactor PostgresFixture for better container management in integration tests.
This commit is contained in:
@@ -74,6 +74,8 @@ public sealed class GetShowQueryHandler(IAppDbContext dbContext)
|
||||
})
|
||||
.ToList();
|
||||
|
||||
// Сортировка идёт до сборки DTO: по свойству record'а EF порядок не переводит и падает
|
||||
// на компиляции запроса («The LINQ expression could not be translated»).
|
||||
var collections = await dbContext
|
||||
.CollectionItems.AsNoTracking()
|
||||
.Where(i => i.ShowId == show.Id)
|
||||
@@ -82,9 +84,15 @@ public sealed class GetShowQueryHandler(IAppDbContext dbContext)
|
||||
item => item.CollectionId,
|
||||
collection => collection.Id,
|
||||
(item, collection) =>
|
||||
new ShowCollectionRefDto(collection.Id, collection.Name, item.Position)
|
||||
new
|
||||
{
|
||||
collection.Id,
|
||||
collection.Name,
|
||||
item.Position,
|
||||
}
|
||||
)
|
||||
.OrderBy(c => c.Name)
|
||||
.Select(c => new ShowCollectionRefDto(c.Id, c.Name, c.Position))
|
||||
.ToListAsync(cancellationToken);
|
||||
|
||||
return Result.Success(
|
||||
|
||||
Reference in New Issue
Block a user