mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-07 21:51:13 -07:00
More work on the settings
This commit is contained in:
parent
8c9bd41057
commit
a00d5b69f2
14 changed files with 152 additions and 39 deletions
|
@ -30,6 +30,7 @@ using System.Web.UI;
|
|||
using Nancy;
|
||||
using Nancy.Extensions;
|
||||
using Nancy.ModelBinding;
|
||||
using Nancy.Responses.Negotiation;
|
||||
using Nancy.Security;
|
||||
|
||||
using RequestPlex.Api;
|
||||
|
@ -60,19 +61,12 @@ namespace RequestPlex.UI.Modules
|
|||
}
|
||||
|
||||
|
||||
private Response Admin()
|
||||
private Negotiator Admin()
|
||||
{
|
||||
dynamic model = new ExpandoObject();
|
||||
model.Errored = Request.Query.error.HasValue;
|
||||
model.Port = null;
|
||||
|
||||
var settings = Service.GetSettings();
|
||||
if (settings != null)
|
||||
{
|
||||
model.Port = settings.Port;
|
||||
model.PlexAuthToken = settings.PlexAuthToken;
|
||||
}
|
||||
|
||||
model = settings;
|
||||
return View["/Admin/Settings", model];
|
||||
}
|
||||
|
||||
|
@ -112,7 +106,7 @@ namespace RequestPlex.UI.Modules
|
|||
Service.SaveSettings(newModel);
|
||||
}
|
||||
|
||||
return Context.GetRedirect("~/admin");
|
||||
return Response.AsJson(new {Result = true, AuthToken = model.user.authentication_token});
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue