1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2025-01-02 13:04:37 +00:00
Lidarr/NzbDrone.Api/Settings/SettingsModule.cs

25 lines
612 B
C#
Raw Normal View History

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();
}
}
}