New: Use ASP.NET Core instead of Nancy

This commit is contained in:
ta264 2021-08-04 21:42:40 +01:00 committed by Qstick
parent fe956f340c
commit c247d07e84
161 changed files with 2893 additions and 3665 deletions

View file

@ -0,0 +1,26 @@
using Lidarr.Http;
using NzbDrone.Core.Notifications;
namespace Lidarr.Api.V1.Notifications
{
[V1ApiController]
public class NotificationController : ProviderControllerBase<NotificationResource, INotification, NotificationDefinition>
{
public static readonly NotificationResourceMapper ResourceMapper = new NotificationResourceMapper();
public NotificationController(NotificationFactory notificationFactory)
: base(notificationFactory, "notification", ResourceMapper)
{
}
protected override void Validate(NotificationDefinition definition, bool includeWarnings)
{
if (!definition.Enable)
{
return;
}
base.Validate(definition, includeWarnings);
}
}
}