mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-07 21:51:13 -07:00
Removed the service locator from the base classes and added in some Api tests
added all the tests back in!
This commit is contained in:
parent
187a59261a
commit
84dc4515fd
21 changed files with 251 additions and 176 deletions
|
@ -30,6 +30,7 @@ using System.Linq;
|
|||
using Nancy;
|
||||
using Nancy.Validation;
|
||||
|
||||
using PlexRequests.Core;
|
||||
using PlexRequests.Core.SettingModels;
|
||||
using PlexRequests.Store;
|
||||
|
||||
|
@ -37,16 +38,20 @@ namespace PlexRequests.UI.Modules
|
|||
{
|
||||
public abstract class BaseApiModule : BaseModule
|
||||
{
|
||||
protected BaseApiModule()
|
||||
protected BaseApiModule(ISettingsService<PlexRequestSettings> s) : base(s)
|
||||
{
|
||||
Settings = s;
|
||||
Before += (ctx) => CheckAuth();
|
||||
}
|
||||
|
||||
protected BaseApiModule(string modulePath) : base(modulePath)
|
||||
protected BaseApiModule(string modulePath, ISettingsService<PlexRequestSettings> s) : base(modulePath, s)
|
||||
{
|
||||
Settings = s;
|
||||
Before += (ctx) => CheckAuth();
|
||||
}
|
||||
|
||||
private ISettingsService<PlexRequestSettings> Settings { get; }
|
||||
|
||||
protected Response ReturnReponse(object result)
|
||||
{
|
||||
var queryString = (DynamicDictionary)Context.Request.Query;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue