ปรับปรุงกระบวนการตรวจจับการ login
This commit is contained in:
@@ -16,7 +16,8 @@ namespace TodoAPI2.Controllers
|
||||
{
|
||||
private ILogger<eva_performance_planController> _logger;
|
||||
private Ieva_performance_planService _repository;
|
||||
private IConfiguration Configuration { get; set; }
|
||||
private Iexternal_employeeService emp;
|
||||
private IConfiguration Configuration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Default constructure for dependency injection
|
||||
@@ -24,22 +25,26 @@ namespace TodoAPI2.Controllers
|
||||
/// <param name="repository"></param>
|
||||
/// <param name="configuration"></param>
|
||||
/// <param name="logger"></param>
|
||||
public eva_performance_planViewController(ILogger<eva_performance_planController> logger, Ieva_performance_planService repository, IConfiguration configuration)
|
||||
/// <param name="inemp"></param>
|
||||
public eva_performance_planViewController(ILogger<eva_performance_planController> logger, Iexternal_employeeService inemp, Ieva_performance_planService repository, IConfiguration configuration)
|
||||
{
|
||||
_logger = logger;
|
||||
_repository = repository;
|
||||
Configuration = configuration;
|
||||
emp = inemp;
|
||||
}
|
||||
|
||||
public IActionResult eva_performance_plan()
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
||||
MyHelper.get_login(HttpContext, emp, Response);
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
||||
return View();
|
||||
}
|
||||
|
||||
public IActionResult eva_performance_plan_d()
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
||||
MyHelper.get_login(HttpContext, emp, Response);
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
||||
return View();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user