mirror of
https://github.com/fergalmoran/Readarr.git
synced 2025-12-22 09:29:59 +00:00
20 lines
774 B
C#
20 lines
774 B
C#
using FluentValidation;
|
|
using NzbDrone.Core.Download;
|
|
using Readarr.Http;
|
|
|
|
namespace Readarr.Api.V1.DownloadClient
|
|
{
|
|
[V1ApiController]
|
|
public class DownloadClientController : ProviderControllerBase<DownloadClientResource, DownloadClientBulkResource, IDownloadClient, DownloadClientDefinition>
|
|
{
|
|
public static readonly DownloadClientResourceMapper ResourceMapper = new ();
|
|
public static readonly DownloadClientBulkResourceMapper BulkResourceMapper = new ();
|
|
|
|
public DownloadClientController(IDownloadClientFactory downloadClientFactory)
|
|
: base(downloadClientFactory, "downloadclient", ResourceMapper, BulkResourceMapper)
|
|
{
|
|
SharedValidator.RuleFor(c => c.Priority).InclusiveBetween(1, 50);
|
|
}
|
|
}
|
|
}
|