mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-10 15:32:37 -07:00
Api work for #205
Refactored how we check if the user has a valid api key Added POST request, PUT and DELTE Also some work on the updater #29
This commit is contained in:
parent
030c013862
commit
7266f20927
10 changed files with 306 additions and 80 deletions
|
@ -33,15 +33,13 @@ using Nancy.Extensions;
|
|||
using PlexRequests.UI.Models;
|
||||
using System;
|
||||
|
||||
using Nancy.Security;
|
||||
|
||||
using PlexRequests.Core;
|
||||
using PlexRequests.Core.SettingModels;
|
||||
using PlexRequests.Helpers;
|
||||
|
||||
namespace PlexRequests.UI.Modules
|
||||
{
|
||||
public class BaseAuthModule : BaseModule
|
||||
public abstract class BaseAuthModule : BaseModule
|
||||
{
|
||||
private string _username;
|
||||
private int _dateTimeOffset = -1;
|
||||
|
@ -77,12 +75,12 @@ namespace PlexRequests.UI.Modules
|
|||
}
|
||||
}
|
||||
|
||||
public BaseAuthModule()
|
||||
protected BaseAuthModule()
|
||||
{
|
||||
Before += (ctx) => CheckAuth();
|
||||
}
|
||||
|
||||
public BaseAuthModule(string modulePath) : base(modulePath)
|
||||
protected BaseAuthModule(string modulePath) : base(modulePath)
|
||||
{
|
||||
Before += (ctx) => CheckAuth();
|
||||
}
|
||||
|
@ -99,8 +97,5 @@ namespace PlexRequests.UI.Modules
|
|||
? Context.GetRedirect(redirectPath)
|
||||
: null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue