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:
tidusjar 2016-05-19 10:36:02 +01:00
parent 030c013862
commit 7266f20927
10 changed files with 306 additions and 80 deletions

View file

@ -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;
}
}
}