mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-21 22:05:38 -04:00
Converted notifications to thingi provider
Fixed: Issues creating and saving Connects
This commit is contained in:
@@ -7,20 +7,19 @@ using Omu.ValueInjecter;
|
||||
namespace NzbDrone.Api.Notifications
|
||||
{
|
||||
public class NotificationSchemaModule : NzbDroneRestModule<NotificationResource>
|
||||
{
|
||||
private readonly INotificationService _notificationService;
|
||||
{
|
||||
private readonly INotificationFactory _notificationFactory;
|
||||
|
||||
public NotificationSchemaModule(INotificationService notificationService)
|
||||
public NotificationSchemaModule(INotificationFactory notificationFactory)
|
||||
: base("notification/schema")
|
||||
{
|
||||
_notificationService = notificationService;
|
||||
|
||||
_notificationFactory = notificationFactory;
|
||||
GetResourceAll = GetSchema;
|
||||
}
|
||||
|
||||
private List<NotificationResource> GetSchema()
|
||||
{
|
||||
var notifications = _notificationService.Schema();
|
||||
var notifications = _notificationFactory.Templates();
|
||||
|
||||
var result = new List<NotificationResource>(notifications.Count);
|
||||
|
||||
@@ -29,7 +28,6 @@ namespace NzbDrone.Api.Notifications
|
||||
var notificationResource = new NotificationResource();
|
||||
notificationResource.InjectFrom(notification);
|
||||
notificationResource.Fields = SchemaBuilder.ToSchema(notification.Settings);
|
||||
notificationResource.TestCommand = String.Format("test{0}", notification.Implementation.ToLowerInvariant());
|
||||
|
||||
result.Add(notificationResource);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user