mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-27 12:33:00 +02:00
Removed tvdblib from tests
Added settings to API
This commit is contained in:
25
NzbDrone.Api/Settings/SettingsModule.cs
Normal file
25
NzbDrone.Api/Settings/SettingsModule.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System.Linq;
|
||||
using Nancy;
|
||||
using NzbDrone.Api.Extensions;
|
||||
using NzbDrone.Core.Configuration;
|
||||
|
||||
namespace NzbDrone.Api.Settings
|
||||
{
|
||||
public class SettingsModule : NzbDroneApiModule
|
||||
{
|
||||
private readonly ConfigService _configService;
|
||||
|
||||
public SettingsModule(ConfigService configService)
|
||||
: base("/settings")
|
||||
{
|
||||
_configService = configService;
|
||||
Get["/"] = x => GetAllSettings();
|
||||
}
|
||||
|
||||
private Response GetAllSettings()
|
||||
{
|
||||
var settings = _configService.All();
|
||||
return settings.AsResponse();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user