ปรับปรุงกระบวนการตรวจจับการ login
This commit is contained in:
@@ -16,35 +16,41 @@ namespace TodoAPI2.Controllers
|
||||
{
|
||||
private ILogger<eva_create_evaluationController> _logger;
|
||||
private Ieva_create_evaluationService _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_evaluationViewController(ILogger<eva_create_evaluationController> logger, Ieva_create_evaluationService repository, IConfiguration configuration)
|
||||
/// <param name="inemp"></param>
|
||||
public eva_create_evaluationViewController(ILogger<eva_create_evaluationController> logger, Iexternal_employeeService inemp, Ieva_create_evaluationService repository, IConfiguration configuration)
|
||||
{
|
||||
_logger = logger;
|
||||
_repository = repository;
|
||||
Configuration = configuration;
|
||||
emp = inemp;
|
||||
}
|
||||
|
||||
public IActionResult eva_create_evaluation()
|
||||
{
|
||||
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_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();
|
||||
}
|
||||
|
||||
public IActionResult eva_create_evaluation_d_summary()
|
||||
{
|
||||
MyHelper.get_login(HttpContext, emp, Response);
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
|
||||
return View();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user