Fixed api blacklist, history, wanted/missing and wanted/cutoff requiring sortKey, now defaulting to an appropriate value (airDateUtc/date desc for most).

fixes #1452
This commit is contained in:
Taloth Saldono
2016-09-10 23:05:34 +02:00
parent 4bf3ef45b0
commit 713e109bc9
7 changed files with 40 additions and 38 deletions

View File

@@ -47,13 +47,7 @@ namespace NzbDrone.Api.History
{
var episodeId = Request.Query.EpisodeId;
var pagingSpec = new PagingSpec<Core.History.History>
{
Page = pagingResource.Page,
PageSize = pagingResource.PageSize,
SortKey = pagingResource.SortKey,
SortDirection = pagingResource.SortDirection
};
var pagingSpec = pagingResource.MapToPagingSpec<HistoryResource, Core.History.History>("date", SortDirection.Descending);
if (pagingResource.FilterKey == "eventType")
{
@@ -77,4 +71,4 @@ namespace NzbDrone.Api.History
return new object().AsResponse();
}
}
}
}