Fixed: Set Default Sort Key for Blacklist Endpoint

This commit is contained in:
Qstick 2019-10-28 21:31:07 -04:00
parent 6a9887f7e2
commit 171f15742d
1 changed files with 1 additions and 7 deletions

View File

@ -17,13 +17,7 @@ namespace Lidarr.Api.V1.Blacklist
private PagingResource<BlacklistResource> GetBlacklist(PagingResource<BlacklistResource> pagingResource) private PagingResource<BlacklistResource> GetBlacklist(PagingResource<BlacklistResource> pagingResource)
{ {
var pagingSpec = new PagingSpec<NzbDrone.Core.Blacklisting.Blacklist> var pagingSpec = pagingResource.MapToPagingSpec<BlacklistResource, NzbDrone.Core.Blacklisting.Blacklist>("date", SortDirection.Descending);
{
Page = pagingResource.Page,
PageSize = pagingResource.PageSize,
SortKey = pagingResource.SortKey,
SortDirection = pagingResource.SortDirection
};
return ApplyToPage(_blacklistService.Paged, pagingSpec, BlacklistResourceMapper.MapToResource); return ApplyToPage(_blacklistService.Paged, pagingSpec, BlacklistResourceMapper.MapToResource);
} }