Fixed trakt searching, cleaned up indexer/notification modules

This commit is contained in:
Mark McDowall 2013-05-29 20:26:47 -07:00
parent 9181b1bb91
commit f21a235c00
7 changed files with 35 additions and 25 deletions

View file

@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using NzbDrone.Api.ClientSchema;
using NzbDrone.Api.Mapping;
using NzbDrone.Api.REST;
using NzbDrone.Core.Notifications;
using Omu.ValueInjecter;
@ -47,11 +48,10 @@ namespace NzbDrone.Api.Notifications
notification = _notificationService.Create(notification);
notificationResource.Id = notification.Id;
var responseResource = new NotificationResource();
responseResource.InjectFrom(notification);
responseResource.Fields = SchemaBuilder.GenerateSchema(notification.Settings);
var response = notification.InjectTo<NotificationResource>();
response.Fields = SchemaBuilder.GenerateSchema(notification.Settings);
return responseResource;
return response;
}
private NotificationResource Update(NotificationResource notificationResource)
@ -60,11 +60,10 @@ namespace NzbDrone.Api.Notifications
notification.Id = notificationResource.Id;
notification = _notificationService.Update(notification);
var responseResource = new NotificationResource();
responseResource.InjectFrom(notification);
responseResource.Fields = SchemaBuilder.GenerateSchema(notification.Settings);
var response = notification.InjectTo<NotificationResource>();
response.Fields = SchemaBuilder.GenerateSchema(notification.Settings);
return responseResource;
return response;
}
private void DeleteNotification(int id)