mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-14 15:03:42 +01:00
23 lines
651 B
C#
23 lines
651 B
C#
|
using NzbDrone.Core.Datastore;
|
|||
|
using NzbDrone.Core.Instrumentation;
|
|||
|
using NzbDrone.Api.Mapping;
|
|||
|
|
|||
|
namespace NzbDrone.Api.Logs
|
|||
|
{
|
|||
|
public class LogModule : NzbDroneRestModule<LogResource>
|
|||
|
{
|
|||
|
private readonly ILogService _logService;
|
|||
|
|
|||
|
public LogModule(ILogService logService)
|
|||
|
{
|
|||
|
_logService = logService;
|
|||
|
GetResourcePaged = GetLogs;
|
|||
|
}
|
|||
|
|
|||
|
private PagingResource<LogResource> GetLogs(PagingResource<LogResource> pagingResource)
|
|||
|
{
|
|||
|
var pageSpec = pagingResource.InjectTo<PagingSpec<Log>>();
|
|||
|
return ApplyToPage(_logService.Paged, pageSpec);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|