mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-10 07:22:35 -07:00
More for #273
This commit is contained in:
parent
6067a4743e
commit
9ffe184dd3
11 changed files with 67 additions and 56 deletions
|
@ -87,21 +87,21 @@ namespace PlexRequests.UI.Modules
|
|||
|
||||
protected BaseAuthModule(ISettingsService<PlexRequestSettings> pr) : base(pr)
|
||||
{
|
||||
Service = pr;
|
||||
PlexRequestSettings = pr;
|
||||
Before += (ctx) => CheckAuth();
|
||||
}
|
||||
|
||||
protected BaseAuthModule(string modulePath, ISettingsService<PlexRequestSettings> pr) : base(modulePath, pr)
|
||||
{
|
||||
Service = pr;
|
||||
PlexRequestSettings = pr;
|
||||
Before += (ctx) => CheckAuth();
|
||||
}
|
||||
|
||||
private ISettingsService<PlexRequestSettings> Service { get; }
|
||||
protected ISettingsService<PlexRequestSettings> PlexRequestSettings { get; }
|
||||
|
||||
private Response CheckAuth()
|
||||
{
|
||||
var settings = Service.GetSettings();
|
||||
var settings = PlexRequestSettings.GetSettings();
|
||||
var baseUrl = settings.BaseUrl;
|
||||
|
||||
var redirectPath = string.IsNullOrEmpty(baseUrl) ? "~/userlogin" : $"~/{baseUrl}/userlogin";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue