rename BrandOptionsDto to BrandingOptionsDto

pull/13756/head
KGT1 3 weeks ago
parent dc8fce9c88
commit 312b36bcb6

@ -29,18 +29,18 @@ public class BrandingController : BaseJellyfinApiController
/// <returns>An <see cref="OkResult"/> containing the branding configuration.</returns>
[HttpGet("Configuration")]
[ProducesResponseType(StatusCodes.Status200OK)]
public ActionResult<BrandOptionsDto> GetBrandingOptions()
public ActionResult<BrandingOptionsDto> GetBrandingOptions()
{
var brandingOptions = _serverConfigurationManager.GetConfiguration<BrandingOptions>("branding");
var brandOptionsDto = new BrandOptionsDto
var brandingOptionsDto = new BrandingOptionsDto
{
LoginDisclaimer = brandingOptions.LoginDisclaimer,
CustomCss = brandingOptions.CustomCss,
SplashscreenEnabled = brandingOptions.SplashscreenEnabled
};
return brandOptionsDto;
return brandingOptionsDto;
}
/// <summary>

@ -129,12 +129,12 @@ public class ConfigurationController : BaseJellyfinApiController
[HttpPost("Configuration/Branding")]
[Authorize(Policy = Policies.RequiresElevation)]
[ProducesResponseType(StatusCodes.Status204NoContent)]
public ActionResult UpdateBrandingConfiguration([FromBody, Required] BrandOptionsDto configuration)
public ActionResult UpdateBrandingConfiguration([FromBody, Required] BrandingOptionsDto configuration)
{
// Get the current branding configuration to preserve SplashscreenLocation
var currentBranding = (BrandingOptions)_configurationManager.GetConfiguration("branding");
// Update only the properties from BrandOptionsDto
// Update only the properties from BrandingOptionsDto
currentBranding.LoginDisclaimer = configuration.LoginDisclaimer;
currentBranding.CustomCss = configuration.CustomCss;
currentBranding.SplashscreenEnabled = configuration.SplashscreenEnabled;

@ -4,7 +4,7 @@ namespace MediaBrowser.Model.Branding;
/// The branding options DTO for API use.
/// This DTO excludes SplashscreenLocation to prevent it from being updated via API.
/// </summary>
public class BrandOptionsDto
public class BrandingOptionsDto
{
/// <summary>
/// Gets or sets the login disclaimer.
Loading…
Cancel
Save