Fixed: Set Default Sort Key for Blacklist Endpoint

pull/3396/head
Mark McDowall 5 years ago
parent d402f7514e
commit 42263a0ec0

@ -17,13 +17,7 @@ namespace Sonarr.Api.V3.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);
} }

Loading…
Cancel
Save