mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-21 22:05:38 -04:00
v3 API
This commit is contained in:
committed by
Taloth Saldono
parent
211f3769e1
commit
7297c1b8e4
@@ -0,0 +1,20 @@
|
||||
using NzbDrone.Core.Notifications;
|
||||
|
||||
namespace Sonarr.Api.V3.Notifications
|
||||
{
|
||||
public class NotificationModule : ProviderModuleBase<NotificationResource, INotification, NotificationDefinition>
|
||||
{
|
||||
public static readonly NotificationResourceMapper ResourceMapper = new NotificationResourceMapper();
|
||||
|
||||
public NotificationModule(NotificationFactory notificationFactory)
|
||||
: base(notificationFactory, "notification", ResourceMapper)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void Validate(NotificationDefinition definition, bool includeWarnings)
|
||||
{
|
||||
if (!definition.OnGrab && !definition.OnDownload) return;
|
||||
base.Validate(definition, includeWarnings);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user