mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 22:13:06 +03:00
Move field to the controller
This commit is contained in:
@@ -23,6 +23,8 @@ namespace Jellyfin.Api.Controllers
|
||||
private readonly IServerConfigurationManager _configurationManager;
|
||||
private readonly IMediaEncoder _mediaEncoder;
|
||||
|
||||
private readonly JsonSerializerOptions _serializerOptions = JsonDefaults.GetOptions();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ConfigurationController"/> class.
|
||||
/// </summary>
|
||||
@@ -88,7 +90,7 @@ namespace Jellyfin.Api.Controllers
|
||||
public async Task<ActionResult> UpdateNamedConfiguration([FromRoute] string? key)
|
||||
{
|
||||
var configurationType = _configurationManager.GetConfigurationType(key);
|
||||
var configuration = await JsonSerializer.DeserializeAsync(Request.Body, configurationType, JsonDefaults.GetOptions()).ConfigureAwait(false);
|
||||
var configuration = await JsonSerializer.DeserializeAsync(Request.Body, configurationType, _serializerOptions).ConfigureAwait(false);
|
||||
_configurationManager.SaveConfiguration(key, configuration);
|
||||
return NoContent();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user