mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 21:03:17 -07:00
Fixed exception and all areas will now use the base url #72
This commit is contained in:
parent
866b6d6d6d
commit
6dea8b7440
7 changed files with 32 additions and 16 deletions
|
@ -56,7 +56,7 @@ using Nancy.Security;
|
|||
|
||||
namespace PlexRequests.UI.Modules
|
||||
{
|
||||
public class AdminModule : NancyModule
|
||||
public class AdminModule : BaseModule
|
||||
{
|
||||
private ISettingsService<PlexRequestSettings> PrService { get; }
|
||||
private ISettingsService<CouchPotatoSettings> CpService { get; }
|
||||
|
@ -181,8 +181,16 @@ namespace PlexRequests.UI.Modules
|
|||
var result = AuthService.SaveSettings(model);
|
||||
if (result)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(BaseUrl))
|
||||
{
|
||||
return Context.GetRedirect($"~/{BaseUrl}/admin/authentication");
|
||||
}
|
||||
return Context.GetRedirect("~/admin/authentication");
|
||||
}
|
||||
if (!string.IsNullOrEmpty(BaseUrl))
|
||||
{
|
||||
return Context.GetRedirect($"~/{BaseUrl}/error"); //TODO create error page
|
||||
}
|
||||
return Context.GetRedirect("~/error"); //TODO create error page
|
||||
}
|
||||
|
||||
|
@ -201,8 +209,7 @@ namespace PlexRequests.UI.Modules
|
|||
|
||||
PrService.SaveSettings(model);
|
||||
|
||||
|
||||
return Context.GetRedirect("~/admin");
|
||||
return Context.GetRedirect(!string.IsNullOrEmpty(BaseUrl) ? $"~/{BaseUrl}/admin" : "~/admin");
|
||||
}
|
||||
|
||||
private Response RequestAuthToken()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue