aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/BrandingService.cs
blob: 4b49b411a8b860f866367a5dc3745e24ea686d76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using MediaBrowser.Common.Configuration;
using MediaBrowser.Model.Branding;
using ServiceStack;

namespace MediaBrowser.Api
{
    [Route("/Branding/Configuration", "GET", Summary = "Gets branding configuration")]
    public class GetBrandingOptions : IReturn<BrandingOptions>
    {
    }
    
    public class BrandingService : BaseApiService
    {
        private readonly IConfigurationManager _config;

        public BrandingService(IConfigurationManager config)
        {
            _config = config;
        }

        public object Get(GetBrandingOptions request)
        {
            var result = _config.GetConfiguration<BrandingOptions>("branding");

            return ToOptimizedResult(result);
        }
    }
}