mirror of
https://github.com/fergalmoran/Readarr.git
synced 2025-12-24 02:20:58 +00:00
New: Use ASP.NET Core instead of Nancy
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using NzbDrone.Core.Download;
|
||||
using Readarr.Http;
|
||||
|
||||
namespace Readarr.Api.V1.DownloadClient
|
||||
{
|
||||
[V1ApiController]
|
||||
public class DownloadClientController : ProviderControllerBase<DownloadClientResource, IDownloadClient, DownloadClientDefinition>
|
||||
{
|
||||
public static readonly DownloadClientResourceMapper ResourceMapper = new DownloadClientResourceMapper();
|
||||
|
||||
public DownloadClientController(IDownloadClientFactory downloadClientFactory)
|
||||
: base(downloadClientFactory, "downloadclient", ResourceMapper)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void Validate(DownloadClientDefinition definition, bool includeWarnings)
|
||||
{
|
||||
if (!definition.Enable)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
base.Validate(definition, includeWarnings);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user