diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-11-26 15:57:16 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-11-26 15:57:16 -0500 |
| commit | 63a0d52fd115f3a4888acd53f9fd92defa9dc721 (patch) | |
| tree | cc934bda5db40dc773893f9d1f1a4e2304911af8 /MediaBrowser.Server.Implementations/HttpServer/SwaggerService.cs | |
| parent | 17081767da92369a29d5f324abebbcfabf4e8ab5 (diff) | |
allow separate configuration of app resources path
Diffstat (limited to 'MediaBrowser.Server.Implementations/HttpServer/SwaggerService.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/HttpServer/SwaggerService.cs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/SwaggerService.cs b/MediaBrowser.Server.Implementations/HttpServer/SwaggerService.cs index 3764697f1..aeaac80e8 100644 --- a/MediaBrowser.Server.Implementations/HttpServer/SwaggerService.cs +++ b/MediaBrowser.Server.Implementations/HttpServer/SwaggerService.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Common.Configuration; +using MediaBrowser.Controller; using MediaBrowser.Controller.Net; using ServiceStack.Web; using System.IO; @@ -7,9 +7,9 @@ namespace MediaBrowser.Server.Implementations.HttpServer { public class SwaggerService : IHasResultFactory, IRestfulService { - private readonly IApplicationPaths _appPaths; + private readonly IServerApplicationPaths _appPaths; - public SwaggerService(IApplicationPaths appPaths) + public SwaggerService(IServerApplicationPaths appPaths) { _appPaths = appPaths; } @@ -21,9 +21,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer /// <returns>System.Object.</returns> public object Get(GetSwaggerResource request) { - var runningDirectory = Path.GetDirectoryName(_appPaths.ApplicationPath); - - var swaggerDirectory = Path.Combine(runningDirectory, "swagger-ui"); + var swaggerDirectory = Path.Combine(_appPaths.ApplicationResourcesPath, "swagger-ui"); var requestedFile = Path.Combine(swaggerDirectory, request.ResourceName.Replace('/', Path.DirectorySeparatorChar)); |
