Removed tvdblib from tests

Added settings to API
This commit is contained in:
Mark McDowall 2013-03-02 13:37:28 -08:00
parent 77eedf448e
commit c5b845cbee
16 changed files with 32 additions and 50 deletions

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