mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-08 14:10:50 -07:00
removed the test code from #72
This commit is contained in:
parent
213a088f07
commit
866b6d6d6d
2 changed files with 12 additions and 6 deletions
|
@ -30,6 +30,9 @@ using Nancy.Extensions;
|
|||
using PlexRequests.UI.Models;
|
||||
using System;
|
||||
|
||||
using PlexRequests.Core;
|
||||
using PlexRequests.Core.SettingModels;
|
||||
|
||||
namespace PlexRequests.UI.Modules
|
||||
{
|
||||
public class BaseAuthModule : BaseModule
|
||||
|
@ -74,11 +77,14 @@ namespace PlexRequests.UI.Modules
|
|||
|
||||
private Response CheckAuth()
|
||||
{
|
||||
if (Session[SessionKeys.UsernameKey] == null)
|
||||
{
|
||||
return Context.GetRedirect("~/test/userlogin");
|
||||
}
|
||||
return null;
|
||||
var settings = Locator.Resolve<ISettingsService<PlexRequestSettings>>().GetSettings();
|
||||
var baseUrl = settings.BaseUrl;
|
||||
|
||||
var redirectPath = string.IsNullOrEmpty(baseUrl) ? "~/userlogin" : $"~/{baseUrl}/userlogin";
|
||||
|
||||
return Session[SessionKeys.UsernameKey] == null
|
||||
? Context.GetRedirect(redirectPath)
|
||||
: null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue