ปรับปรุงกระบวนการตรวจจับการ login
This commit is contained in:
@@ -16,30 +16,36 @@ namespace TodoAPI2.Controllers
|
||||
{
|
||||
private ILogger<eva_create_evaluation_detail_agreementController> _logger;
|
||||
private Ieva_create_evaluation_detail_agreementService _repository;
|
||||
private IConfiguration Configuration { get; set; }
|
||||
|
||||
private Iexternal_employeeService emp;
|
||||
private IConfiguration Configuration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Default constructure for dependency injection
|
||||
/// </summary>
|
||||
/// <param name="repository"></param>
|
||||
/// <param name="configuration"></param>
|
||||
/// <param name="configuration"></param>
|
||||
/// <param name="logger"></param>
|
||||
public eva_create_evaluation_detail_agreementViewController(ILogger<eva_create_evaluation_detail_agreementController> logger, Ieva_create_evaluation_detail_agreementService repository, IConfiguration configuration)
|
||||
/// <param name="inemp"></param>
|
||||
public eva_create_evaluation_detail_agreementViewController(
|
||||
ILogger<eva_create_evaluation_detail_agreementController> logger, Iexternal_employeeService inemp, Ieva_create_evaluation_detail_agreementService repository, IConfiguration configuration)
|
||||
{
|
||||
_logger = logger;
|
||||
_repository = repository;
|
||||
Configuration = configuration;
|
||||
emp = inemp;
|
||||
}
|
||||
|
||||
public IActionResult eva_create_evaluation_detail_agreement()
|
||||
{
|
||||
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_create_evaluation_detail_agreement_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