mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
Fixed exception and all areas will now use the base url #72
This commit is contained in:
parent
866b6d6d6d
commit
6dea8b7440
7 changed files with 32 additions and 16 deletions
|
@ -35,10 +35,12 @@ namespace PlexRequests.UI.Modules
|
|||
public class BaseModule : NancyModule
|
||||
{
|
||||
protected ServiceLocator Locator => ServiceLocator.Instance;
|
||||
protected string BaseUrl { get; set; }
|
||||
public BaseModule()
|
||||
{
|
||||
var settings = Locator.Resolve<ISettingsService<PlexRequestSettings>>().GetSettings();
|
||||
var baseUrl = settings.BaseUrl;
|
||||
BaseUrl = baseUrl;
|
||||
|
||||
var modulePath = string.IsNullOrEmpty(baseUrl) ? string.Empty : baseUrl;
|
||||
|
||||
|
@ -49,6 +51,7 @@ namespace PlexRequests.UI.Modules
|
|||
{
|
||||
var settings = Locator.Resolve<ISettingsService<PlexRequestSettings>>().GetSettings();
|
||||
var baseUrl = settings.BaseUrl;
|
||||
BaseUrl = baseUrl;
|
||||
|
||||
var settingModulePath = string.IsNullOrEmpty(baseUrl) ? modulePath : $"{baseUrl}/{modulePath}";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue