mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
Removed virtuals from ConfigService.
Settings UI taking shape.
This commit is contained in:
parent
b9a14a5cf5
commit
9bb383e2b8
18 changed files with 654 additions and 222 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue