You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
612 B
25 lines
612 B
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();
|
|
}
|
|
}
|
|
} |