mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-30 11:48:26 -07:00
Moved source code under src folder - massive change
This commit is contained in:
parent
2fc8123d6b
commit
5bf0e197ec
1499 changed files with 1054 additions and 1444 deletions
29
src/NzbDrone.Api/History/HistoryModule.cs
Normal file
29
src/NzbDrone.Api/History/HistoryModule.cs
Normal file
|
@ -0,0 +1,29 @@
|
|||
using NzbDrone.Core.Datastore;
|
||||
using NzbDrone.Core.History;
|
||||
|
||||
namespace NzbDrone.Api.History
|
||||
{
|
||||
public class HistoryModule : NzbDroneRestModule<HistoryResource>
|
||||
{
|
||||
private readonly IHistoryService _historyService;
|
||||
|
||||
public HistoryModule(IHistoryService historyService)
|
||||
{
|
||||
_historyService = historyService;
|
||||
GetResourcePaged = GetHistory;
|
||||
}
|
||||
|
||||
private PagingResource<HistoryResource> GetHistory(PagingResource<HistoryResource> pagingResource)
|
||||
{
|
||||
var pagingSpec = new PagingSpec<Core.History.History>
|
||||
{
|
||||
Page = pagingResource.Page,
|
||||
PageSize = pagingResource.PageSize,
|
||||
SortKey = pagingResource.SortKey,
|
||||
SortDirection = pagingResource.SortDirection
|
||||
};
|
||||
|
||||
return ApplyToPage(_historyService.Paged, pagingSpec);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue