|
|
|
|
@@ -24,6 +24,7 @@ using Microsoft.AspNetCore.Authentication.Cookies;
|
|
|
|
|
using CompanyManagment.App.Contracts.AndroidApkVersion;
|
|
|
|
|
using CompanyManagment.EFCore;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using Microsoft.Extensions.Options;
|
|
|
|
|
|
|
|
|
|
namespace ServiceHost.Pages.login;
|
|
|
|
|
|
|
|
|
|
@@ -35,6 +36,7 @@ public class IndexModel : PageModel
|
|
|
|
|
private readonly IAndroidApkVersionApplication _androidApkVersionApplication;
|
|
|
|
|
private readonly CompanyContext _context;
|
|
|
|
|
private readonly IRollCallDomainService _rollCallDomainService;
|
|
|
|
|
private readonly AppSettingConfiguration _appSettingConfiguration;
|
|
|
|
|
|
|
|
|
|
public string Mess { get; set; }
|
|
|
|
|
[BindProperty] public string Username { get; set; }
|
|
|
|
|
@@ -47,7 +49,7 @@ public class IndexModel : PageModel
|
|
|
|
|
|
|
|
|
|
public IndexModel(IAccountApplication accountApplication, IGoogleRecaptcha googleRecaptcha,
|
|
|
|
|
IAuthHelper authHelper, IAndroidApkVersionApplication androidApkVersionApplication, CompanyContext context,
|
|
|
|
|
IRollCallDomainService rollCallDomainService)
|
|
|
|
|
IRollCallDomainService rollCallDomainService, IOptions<AppSettingConfiguration> optionsAppSetting)
|
|
|
|
|
{
|
|
|
|
|
_accountApplication = accountApplication;
|
|
|
|
|
_googleRecaptcha = googleRecaptcha;
|
|
|
|
|
@@ -55,6 +57,7 @@ public class IndexModel : PageModel
|
|
|
|
|
_androidApkVersionApplication = androidApkVersionApplication;
|
|
|
|
|
_context = context;
|
|
|
|
|
_rollCallDomainService = rollCallDomainService;
|
|
|
|
|
_appSettingConfiguration = optionsAppSetting.Value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public IActionResult OnGet()
|
|
|
|
|
@@ -87,7 +90,7 @@ public class IndexModel : PageModel
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return Redirect("/Admin");
|
|
|
|
|
return Redirect($"https://{_appSettingConfiguration.AdminDomain}");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -167,7 +170,7 @@ public class IndexModel : PageModel
|
|
|
|
|
switch (result.SendId)
|
|
|
|
|
{
|
|
|
|
|
case 1:
|
|
|
|
|
return Redirect("/Admin");
|
|
|
|
|
return Redirect($"https://{_appSettingConfiguration.AdminDomain}");
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
|
|
|
|
|
|