mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
added missing GetResourceById methods.
This commit is contained in:
@@ -6,6 +6,8 @@ using NzbDrone.Api.REST;
|
||||
using NzbDrone.Core.Indexers;
|
||||
using Omu.ValueInjecter;
|
||||
using FluentValidation;
|
||||
using NzbDrone.Api.Extensions;
|
||||
using NzbDrone.Api.Mapping;
|
||||
|
||||
namespace NzbDrone.Api.Indexers
|
||||
{
|
||||
@@ -17,6 +19,7 @@ namespace NzbDrone.Api.Indexers
|
||||
{
|
||||
_indexerService = indexerService;
|
||||
GetResourceAll = GetAll;
|
||||
GetResourceById = GetIndexer;
|
||||
CreateResource = CreateIndexer;
|
||||
UpdateResource = UpdateIndexer;
|
||||
DeleteResource = DeleteIndexer;
|
||||
@@ -28,6 +31,11 @@ namespace NzbDrone.Api.Indexers
|
||||
PostValidator.RuleFor(c => c.Fields).NotEmpty();
|
||||
}
|
||||
|
||||
private IndexerResource GetIndexer(int id)
|
||||
{
|
||||
return _indexerService.Get(id).InjectTo<IndexerResource>();
|
||||
}
|
||||
|
||||
private List<IndexerResource> GetAll()
|
||||
{
|
||||
var indexers = _indexerService.All();
|
||||
|
Reference in New Issue
Block a user