|
|
@ -36,6 +36,7 @@ using Newtonsoft.Json;
|
|
|
|
|
|
|
|
|
|
|
|
using PlexRequests.Core;
|
|
|
|
using PlexRequests.Core;
|
|
|
|
using PlexRequests.Core.SettingModels;
|
|
|
|
using PlexRequests.Core.SettingModels;
|
|
|
|
|
|
|
|
using PlexRequests.Helpers;
|
|
|
|
|
|
|
|
|
|
|
|
namespace PlexRequests.UI.Modules
|
|
|
|
namespace PlexRequests.UI.Modules
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -45,6 +46,9 @@ namespace PlexRequests.UI.Modules
|
|
|
|
ISettingsService<PlexSettings> plexSettings, ISettingsService<CouchPotatoSettings> cp,
|
|
|
|
ISettingsService<PlexSettings> plexSettings, ISettingsService<CouchPotatoSettings> cp,
|
|
|
|
ISettingsService<SonarrSettings> sonarr, ISettingsService<SickRageSettings> sr, ISettingsService<HeadphonesSettings> hp) : base("api", pr)
|
|
|
|
ISettingsService<SonarrSettings> sonarr, ISettingsService<SickRageSettings> sr, ISettingsService<HeadphonesSettings> hp) : base("api", pr)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
Get["GetVersion", "/version"] = x => GetVersion();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Get["GetAuthSettings", "/settings/authentication"] = x => GetAuthSettings();
|
|
|
|
Get["GetAuthSettings", "/settings/authentication"] = x => GetAuthSettings();
|
|
|
|
Post["PostAuthSettings", "/settings/authentication"] = x => PostAuthSettings();
|
|
|
|
Post["PostAuthSettings", "/settings/authentication"] = x => PostAuthSettings();
|
|
|
|
|
|
|
|
|
|
|
@ -83,6 +87,12 @@ namespace PlexRequests.UI.Modules
|
|
|
|
private ISettingsService<SickRageSettings> SickRageSettings { get; }
|
|
|
|
private ISettingsService<SickRageSettings> SickRageSettings { get; }
|
|
|
|
private ISettingsService<HeadphonesSettings> HeadphonesSettings { get; }
|
|
|
|
private ISettingsService<HeadphonesSettings> HeadphonesSettings { get; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Response GetVersion()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return ReturnReponse(AssemblyHelper.GetProductVersion());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Response GetPrSettings()
|
|
|
|
private Response GetPrSettings()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var model = new ApiModel<PlexRequestSettings>();
|
|
|
|
var model = new ApiModel<PlexRequestSettings>();
|
|
|
|