แก้ไข OP 2651
This commit is contained in:
@@ -59,12 +59,12 @@ namespace TodoAPI2.Controllers
|
||||
/// <returns>Return Get specific item by id</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("{id}")]
|
||||
[HttpGet("{id}/{path}")]
|
||||
[ProducesResponseType(typeof(eva_create_evaluation_detail_processWithSelectionViewModel), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult Get(int id)
|
||||
public IActionResult Get(int id, string path)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -74,7 +74,7 @@ namespace TodoAPI2.Controllers
|
||||
{
|
||||
var loginid = Convert.ToInt32(HttpContext.Request.Cookies["user_id"]);
|
||||
var e = emp.GetEmployeeForLogin(Convert.ToInt32(loginid));
|
||||
var result = _repository.GetWithSelection(id, e.id);
|
||||
var result = _repository.GetWithSelection(id, e.id, path);
|
||||
|
||||
return Ok(result);
|
||||
}
|
||||
@@ -142,7 +142,7 @@ namespace TodoAPI2.Controllers
|
||||
{
|
||||
var loginid = Convert.ToInt32(HttpContext.Request.Cookies["user_id"]);
|
||||
var e = emp.GetEmployeeForLogin(Convert.ToInt32(loginid));
|
||||
return Ok(_repository.GetListBycreate_evaluation_id(create_evaluation_id, e.id));
|
||||
return Ok(_repository.GetListBycreate_evaluation_id(create_evaluation_id, e.id, HttpContext.Request.Path));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -179,7 +179,7 @@ namespace TodoAPI2.Controllers
|
||||
{
|
||||
var loginid = Convert.ToInt32(HttpContext.Request.Cookies["user_id"]);
|
||||
var e = emp.GetEmployeeForLogin(Convert.ToInt32(loginid));
|
||||
return Ok(_repository.GetListBySearch(model, e.id));
|
||||
return Ok(_repository.GetListBySearch(model, e.id, model.path));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user