mirror of
https://github.com/Cleanuparr/Cleanuparr.git
synced 2026-03-04 06:18:08 -05:00
db config checkpoint
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using Common.Configuration;
|
||||
using Common.Configuration.Arr;
|
||||
using Common.Configuration.DownloadCleaner;
|
||||
using Common.Configuration.DownloadClient;
|
||||
using Common.Configuration.General;
|
||||
using Common.Configuration.Notification;
|
||||
using Common.Configuration.QueueCleaner;
|
||||
@@ -53,7 +52,7 @@ public class ConfigurationController : ControllerBase
|
||||
[HttpGet("download_client")]
|
||||
public async Task<IActionResult> GetDownloadClientConfig()
|
||||
{
|
||||
var config = await _configManager.GetConfigurationAsync<DownloadClientConfig>();
|
||||
var config = await _configManager.GetConfigurationAsync<DownloadClientConfigs>();
|
||||
return Ok(config);
|
||||
}
|
||||
|
||||
@@ -195,13 +194,13 @@ public class ConfigurationController : ControllerBase
|
||||
}
|
||||
|
||||
[HttpPut("download_client")]
|
||||
public async Task<IActionResult> UpdateDownloadClientConfig(DownloadClientConfig newConfig)
|
||||
public async Task<IActionResult> UpdateDownloadClientConfig(DownloadClientConfigs newConfigs)
|
||||
{
|
||||
// Validate the configuration
|
||||
newConfig.Validate();
|
||||
newConfigs.Validate();
|
||||
|
||||
// Persist the configuration
|
||||
var result = await _configManager.SaveConfigurationAsync(newConfig);
|
||||
var result = await _configManager.SaveConfigurationAsync(newConfigs);
|
||||
if (!result)
|
||||
{
|
||||
return StatusCode(500, "Failed to save DownloadClient configuration");
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using Common.Configuration.Arr;
|
||||
using Common.Configuration.DownloadClient;
|
||||
using Infrastructure.Configuration;
|
||||
using Infrastructure.Verticals.Arr;
|
||||
using Infrastructure.Verticals.DownloadClient;
|
||||
@@ -38,7 +37,7 @@ public class StatusController : ControllerBase
|
||||
var process = Process.GetCurrentProcess();
|
||||
|
||||
// Get configuration
|
||||
var downloadClientConfig = await _configManager.GetConfigurationAsync<DownloadClientConfig>();
|
||||
var downloadClientConfig = await _configManager.GetConfigurationAsync<DownloadClientConfigs>();
|
||||
var sonarrConfig = await _configManager.GetConfigurationAsync<SonarrConfig>();
|
||||
var radarrConfig = await _configManager.GetConfigurationAsync<RadarrConfig>();
|
||||
var lidarrConfig = await _configManager.GetConfigurationAsync<LidarrConfig>();
|
||||
@@ -91,7 +90,7 @@ public class StatusController : ControllerBase
|
||||
{
|
||||
try
|
||||
{
|
||||
var downloadClientConfig = await _configManager.GetConfigurationAsync<DownloadClientConfig>();
|
||||
var downloadClientConfig = await _configManager.GetConfigurationAsync<DownloadClientConfigs>();
|
||||
var result = new Dictionary<string, object>();
|
||||
|
||||
// Check for configured clients
|
||||
|
||||
Reference in New Issue
Block a user