1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-27 18:30:45 +00:00

Fixed: Set Default Sort Key for Blacklist Endpoint

This commit is contained in:
Qstick 2019-10-28 21:40:52 -04:00
parent 96fe74760f
commit 8ad995e56f

View file

@ -17,13 +17,7 @@ public BlacklistModule(IBlacklistService blacklistService)
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);
} }