mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Removed virtuals from ConfigService.
Settings UI taking shape.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user