mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-07 05:31:13 -07:00
Using the IoC container now
This commit is contained in:
parent
bee57b46ff
commit
6fd1e3ba32
27 changed files with 636 additions and 88 deletions
|
@ -1,12 +1,28 @@
|
|||
using Nancy;
|
||||
|
||||
using RequestPlex.Core;
|
||||
using RequestPlex.Core.SettingModels;
|
||||
|
||||
namespace RequestPlex.UI.Modules
|
||||
{
|
||||
public class RequestsModule : NancyModule
|
||||
{
|
||||
public RequestsModule()
|
||||
public RequestsModule(ISettingsService<RequestPlexSettings> s)
|
||||
{
|
||||
Get["requests/"] = _ => "Hello!";
|
||||
Get["requests/test"] = _ =>
|
||||
{
|
||||
var se = new RequestPlexSettings
|
||||
{
|
||||
PlexAuthToken = "abc",
|
||||
Port = 2344,
|
||||
UserAuthentication = false
|
||||
};
|
||||
s.SaveSettings(se);
|
||||
var a = s.GetSettings();
|
||||
return "Hi!";
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue