mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-11 07:46:05 -07:00
This commit is contained in:
parent
80a9e54c4b
commit
eec7d42a88
2 changed files with 35 additions and 1 deletions
|
@ -233,13 +233,28 @@ namespace Ombi.UI.Modules
|
|||
var result = await AuthenticationSetup(userId, username, dateTimeOffset, loginGuid, isOwner);
|
||||
|
||||
|
||||
var landingSettings = await LandingPageSettings.GetSettingsAsync();
|
||||
|
||||
if (landingSettings.Enabled)
|
||||
{
|
||||
if (!landingSettings.BeforeLogin) // After Login
|
||||
{
|
||||
var uri = Linker.BuildRelativeUri(Context, "LandingPageIndex");
|
||||
if (loginGuid != Guid.Empty)
|
||||
{
|
||||
return CustomModuleExtensions.LoginAndRedirect(this, result.LoginGuid, null, uri.ToString());
|
||||
}
|
||||
return Response.AsRedirect(uri.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var retVal = Linker.BuildRelativeUri(Context, "SearchIndex");
|
||||
if (result.LoginGuid != Guid.Empty)
|
||||
{
|
||||
return CustomModuleExtensions.LoginAndRedirect(this, result.LoginGuid, null, retVal.ToString());
|
||||
}
|
||||
return Response.AsJson(new { result = true, url = retVal.ToString() });
|
||||
|
||||
}
|
||||
|
||||
private async Task<PlexUsers> IsPlexUser(string username)
|
||||
|
@ -318,6 +333,21 @@ namespace Ombi.UI.Modules
|
|||
|
||||
var m = await AuthenticationSetup(userId, username, dateTimeOffset, loginGuid, isOwner);
|
||||
|
||||
var landingSettings = await LandingPageSettings.GetSettingsAsync();
|
||||
|
||||
if (landingSettings.Enabled)
|
||||
{
|
||||
if (!landingSettings.BeforeLogin) // After Login
|
||||
{
|
||||
var uri = Linker.BuildRelativeUri(Context, "LandingPageIndex");
|
||||
if (m.LoginGuid != Guid.Empty)
|
||||
{
|
||||
return CustomModuleExtensions.LoginAndRedirect(this, m.LoginGuid, null, uri.ToString());
|
||||
}
|
||||
return Response.AsRedirect(uri.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
var retVal = Linker.BuildRelativeUri(Context, "SearchIndex");
|
||||
if (m.LoginGuid != Guid.Empty)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue