New: Use ASP.NET Core instead of Nancy

This commit is contained in:
ta264
2021-03-11 20:56:24 +00:00
parent d348232e0d
commit 58ddbcd77e
158 changed files with 2747 additions and 3544 deletions

View File

@@ -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);
}
}
}