aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/BrandingController.cs
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2023-02-04 10:21:49 -0700
committerGitHub <noreply@github.com>2023-02-04 10:21:49 -0700
commitd1af317d98a6190711af406af17b569844aebbd7 (patch)
tree3422bb577d2821a9798465439e983932690aa2e3 /Jellyfin.Api/Controllers/BrandingController.cs
parente0519189b25bc4605889e46d9583fea9aef41732 (diff)
parentdfea1229e12764a77f5d392194b1848f80b87042 (diff)
Merge pull request #9215 from Shadowghost/api-scoped-namespace
Diffstat (limited to 'Jellyfin.Api/Controllers/BrandingController.cs')
-rw-r--r--Jellyfin.Api/Controllers/BrandingController.cs85
1 files changed, 42 insertions, 43 deletions
diff --git a/Jellyfin.Api/Controllers/BrandingController.cs b/Jellyfin.Api/Controllers/BrandingController.cs
index d3ea41201..3c2c4b4db 100644
--- a/Jellyfin.Api/Controllers/BrandingController.cs
+++ b/Jellyfin.Api/Controllers/BrandingController.cs
@@ -4,54 +4,53 @@ using MediaBrowser.Model.Branding;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
-namespace Jellyfin.Api.Controllers
+namespace Jellyfin.Api.Controllers;
+
+/// <summary>
+/// Branding controller.
+/// </summary>
+public class BrandingController : BaseJellyfinApiController
{
+ private readonly IServerConfigurationManager _serverConfigurationManager;
+
/// <summary>
- /// Branding controller.
+ /// Initializes a new instance of the <see cref="BrandingController"/> class.
/// </summary>
- public class BrandingController : BaseJellyfinApiController
+ /// <param name="serverConfigurationManager">Instance of the <see cref="IServerConfigurationManager"/> interface.</param>
+ public BrandingController(IServerConfigurationManager serverConfigurationManager)
{
- private readonly IServerConfigurationManager _serverConfigurationManager;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="BrandingController"/> class.
- /// </summary>
- /// <param name="serverConfigurationManager">Instance of the <see cref="IServerConfigurationManager"/> interface.</param>
- public BrandingController(IServerConfigurationManager serverConfigurationManager)
- {
- _serverConfigurationManager = serverConfigurationManager;
- }
+ _serverConfigurationManager = serverConfigurationManager;
+ }
- /// <summary>
- /// Gets branding configuration.
- /// </summary>
- /// <response code="200">Branding configuration returned.</response>
- /// <returns>An <see cref="OkResult"/> containing the branding configuration.</returns>
- [HttpGet("Configuration")]
- [ProducesResponseType(StatusCodes.Status200OK)]
- public ActionResult<BrandingOptions> GetBrandingOptions()
- {
- return _serverConfigurationManager.GetConfiguration<BrandingOptions>("branding");
- }
+ /// <summary>
+ /// Gets branding configuration.
+ /// </summary>
+ /// <response code="200">Branding configuration returned.</response>
+ /// <returns>An <see cref="OkResult"/> containing the branding configuration.</returns>
+ [HttpGet("Configuration")]
+ [ProducesResponseType(StatusCodes.Status200OK)]
+ public ActionResult<BrandingOptions> GetBrandingOptions()
+ {
+ return _serverConfigurationManager.GetConfiguration<BrandingOptions>("branding");
+ }
- /// <summary>
- /// Gets branding css.
- /// </summary>
- /// <response code="200">Branding css returned.</response>
- /// <response code="204">No branding css configured.</response>
- /// <returns>
- /// An <see cref="OkResult"/> containing the branding css if exist,
- /// or a <see cref="NoContentResult"/> if the css is not configured.
- /// </returns>
- [HttpGet("Css")]
- [HttpGet("Css.css", Name = "GetBrandingCss_2")]
- [Produces("text/css")]
- [ProducesResponseType(StatusCodes.Status200OK)]
- [ProducesResponseType(StatusCodes.Status204NoContent)]
- public ActionResult<string> GetBrandingCss()
- {
- var options = _serverConfigurationManager.GetConfiguration<BrandingOptions>("branding");
- return options.CustomCss ?? string.Empty;
- }
+ /// <summary>
+ /// Gets branding css.
+ /// </summary>
+ /// <response code="200">Branding css returned.</response>
+ /// <response code="204">No branding css configured.</response>
+ /// <returns>
+ /// An <see cref="OkResult"/> containing the branding css if exist,
+ /// or a <see cref="NoContentResult"/> if the css is not configured.
+ /// </returns>
+ [HttpGet("Css")]
+ [HttpGet("Css.css", Name = "GetBrandingCss_2")]
+ [Produces("text/css")]
+ [ProducesResponseType(StatusCodes.Status200OK)]
+ [ProducesResponseType(StatusCodes.Status204NoContent)]
+ public ActionResult<string> GetBrandingCss()
+ {
+ var options = _serverConfigurationManager.GetConfiguration<BrandingOptions>("branding");
+ return options.CustomCss ?? string.Empty;
}
}