mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-07 21:51:13 -07:00
Small changes
This commit is contained in:
parent
2f5db03815
commit
93c5cf6eb6
8 changed files with 16 additions and 25 deletions
|
@ -33,25 +33,24 @@ namespace PlexRequests.UI.Modules
|
|||
{
|
||||
public class BaseModule : NancyModule
|
||||
{
|
||||
// TODO get this working
|
||||
public BaseModule()
|
||||
{
|
||||
//CheckAuth();
|
||||
Before += (ctx)=> CheckAuth();
|
||||
}
|
||||
|
||||
public BaseModule(string modulePath) : base(modulePath)
|
||||
{
|
||||
//CheckAuth();
|
||||
Before += (ctx) => CheckAuth();
|
||||
}
|
||||
|
||||
|
||||
private void CheckAuth()
|
||||
private Response CheckAuth()
|
||||
{
|
||||
|
||||
if (Request?.Session?[SessionKeys.UsernameKey] == null)
|
||||
if (Session[SessionKeys.UsernameKey] == null)
|
||||
{
|
||||
Context.GetRedirect("~/userlogin");
|
||||
return Context.GetRedirect("~/userlogin");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue