mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-08 06:00:50 -07:00
Added travisyml
This commit is contained in:
parent
55a5ad57ba
commit
2752a14407
5 changed files with 26 additions and 4 deletions
|
@ -25,7 +25,10 @@
|
|||
// ************************************************************************/
|
||||
#endregion
|
||||
using Nancy;
|
||||
using Nancy.Responses.Negotiation;
|
||||
|
||||
using PlexRequests.Core;
|
||||
using PlexRequests.Core.SettingModels;
|
||||
using PlexRequests.UI.Models;
|
||||
|
||||
namespace PlexRequests.UI.Modules
|
||||
|
@ -37,12 +40,20 @@ namespace PlexRequests.UI.Modules
|
|||
// TODO: Allow the user of a username only or a Username and password
|
||||
public class UserLoginModule : NancyModule
|
||||
{
|
||||
public UserLoginModule() : base("userlogin")
|
||||
public UserLoginModule(ISettingsService<AuthenticationSettings> auth) : base("userlogin")
|
||||
{
|
||||
Get["/"] = _ => View["Index"];
|
||||
AuthService = auth;
|
||||
Get["/"] = _ => Index();
|
||||
Post["/"] = x => LoginUser();
|
||||
}
|
||||
|
||||
public Negotiator Index()
|
||||
{
|
||||
var settings = AuthService.GetSettings();
|
||||
return View["Index", settings];
|
||||
}
|
||||
private ISettingsService<AuthenticationSettings> AuthService { get; set; }
|
||||
|
||||
private Response LoginUser()
|
||||
{
|
||||
var username = Request.Form.username;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue