Removed virtuals from ConfigService.

Settings UI taking shape.
This commit is contained in:
Mark McDowall 2013-03-04 22:50:42 -08:00
parent b9a14a5cf5
commit 9bb383e2b8
18 changed files with 654 additions and 222 deletions

View file

@ -9,13 +9,14 @@ namespace NzbDrone.Api.Settings
{
public class SettingsModule : NzbDroneApiModule
{
private readonly ConfigService _configService;
private readonly IConfigService _configService;
public SettingsModule(ConfigService configService)
public SettingsModule(IConfigService configService)
: base("/settings")
{
_configService = configService;
Get["/"] = x => GetAllSettings();
Post["/"] = x => SaveSettings();
}
private Response GetAllSettings()
@ -27,5 +28,12 @@ namespace NzbDrone.Api.Settings
return _configService.AllWithDefaults().AsResponse();
}
private Response SaveSettings()
{
var request = Request.Body.FromJson<Dictionary<string, object>>();
return request.AsResponse();
}
}
}