mirror of
https://github.com/Readarr/Readarr
synced 2026-01-08 16:43:34 +01:00
19 lines
780 B
C#
19 lines
780 B
C#
using NzbDrone.Core.Indexers;
|
|
using NzbDrone.Core.Validation;
|
|
using Readarr.Http;
|
|
|
|
namespace Readarr.Api.V1.Indexers
|
|
{
|
|
[V1ApiController]
|
|
public class IndexerController : ProviderControllerBase<IndexerResource, IndexerBulkResource, IIndexer, IndexerDefinition>
|
|
{
|
|
public static readonly IndexerResourceMapper ResourceMapper = new ();
|
|
public static readonly IndexerBulkResourceMapper BulkResourceMapper = new ();
|
|
|
|
public IndexerController(IndexerFactory indexerFactory, DownloadClientExistsValidator downloadClientExistsValidator)
|
|
: base(indexerFactory, "indexer", ResourceMapper, BulkResourceMapper)
|
|
{
|
|
SharedValidator.RuleFor(c => c.DownloadClientId).SetValidator(downloadClientExistsValidator);
|
|
}
|
|
}
|
|
}
|