mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-07 13:41:13 -07:00
Added first implimentation of the Notification Service #8
Added tests to cover the notification service
This commit is contained in:
parent
aa5304b8dd
commit
b9a886d5dc
13 changed files with 410 additions and 10 deletions
|
@ -40,6 +40,7 @@ using PlexRequests.Api.Interfaces;
|
|||
using PlexRequests.Core;
|
||||
using PlexRequests.Core.SettingModels;
|
||||
using PlexRequests.Helpers;
|
||||
using PlexRequests.Services.Notification;
|
||||
using PlexRequests.UI.Helpers;
|
||||
using PlexRequests.UI.Models;
|
||||
|
||||
|
@ -302,8 +303,13 @@ namespace PlexRequests.UI.Modules
|
|||
Log.Trace(settings.DumpJson());
|
||||
|
||||
var result = EmailService.SaveSettings(settings);
|
||||
|
||||
NotificationService.Subscribe(new EmailMessageNotification(EmailService));
|
||||
|
||||
Log.Info("Saved email settings, result: {0}", result);
|
||||
return Context.GetRedirect("~/admin/emailnotification");
|
||||
return Response.AsJson(result
|
||||
? new JsonResponseModel { Result = true, Message = "Successfully Updated the Settings for Email Notifications!" }
|
||||
: new JsonResponseModel { Result = false, Message = "Could not update the settings, take a look at the logs." });
|
||||
}
|
||||
|
||||
private Negotiator Status()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue