mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-30 19:45:57 +00:00
c5b845cbee
Added settings to API
25 lines
No EOL
612 B
C#
25 lines
No EOL
612 B
C#
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();
|
|
}
|
|
}
|
|
} |