mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-25 22:59:10 -04:00
Converted notifications to thingi provider
Fixed: Issues creating and saving Connects
This commit is contained in:
@@ -1,32 +1,20 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using NzbDrone.Core.Datastore;
|
||||
using NzbDrone.Core.Datastore;
|
||||
using NzbDrone.Core.Messaging.Events;
|
||||
using NzbDrone.Core.ThingiProvider;
|
||||
|
||||
|
||||
namespace NzbDrone.Core.Notifications
|
||||
{
|
||||
public interface INotificationRepository : IBasicRepository<NotificationDefinition>
|
||||
public interface INotificationRepository : IProviderRepository<NotificationDefinition>
|
||||
{
|
||||
NotificationDefinition Get(string name);
|
||||
NotificationDefinition Find(string name);
|
||||
|
||||
}
|
||||
|
||||
public class NotificationRepository : BasicRepository<NotificationDefinition>, INotificationRepository
|
||||
public class NotificationRepository : ProviderRepository<NotificationDefinition>, INotificationRepository
|
||||
{
|
||||
public NotificationRepository(IDatabase database, IEventAggregator eventAggregator)
|
||||
: base(database, eventAggregator)
|
||||
{
|
||||
}
|
||||
|
||||
public NotificationDefinition Get(string name)
|
||||
{
|
||||
return Query.Single(i => i.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase));
|
||||
}
|
||||
|
||||
public NotificationDefinition Find(string name)
|
||||
{
|
||||
return Query.SingleOrDefault(i => i.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user