รวม code ปรับปรุงตาม change request จากทีม

This commit is contained in:
Nakorn Rientrakrunchai
2020-04-26 13:27:10 +07:00
parent f353f73d17
commit 60dd022bea
29 changed files with 496 additions and 93 deletions

View File

@@ -95,5 +95,31 @@ namespace TodoAPI2.Controllers
return StatusCode(500, $"Exception while get specific item. {ex.Message}");
}
}
/// <summary>
/// GetLeaveOfEmployee
/// </summary>
/// <remarks>
/// </remarks>
/// <returns>Return list of items by specifced keyword</returns>
/// <response code="200">Returns the item</response>
/// <response code="500">Error Occurred</response>
[HttpGet("GetLeaveOfEmployee")]
[ProducesResponseType(typeof(List<employee_leaveViewModel>), 200)]
[ProducesResponseType(400)]
[ProducesResponseType(500)]
//[ValidateAntiForgeryToken]
public IActionResult GetLeaveOfEmployee(int employee_id, DateTime? start_date, DateTime? end_date)
{
try
{
return Ok(_repository.GetLeaveOfEmployee(employee_id, start_date, end_date));
}
catch (Exception ex)
{
_logger.LogCritical($"Exception while get list of items.", ex);
return StatusCode(500, $"Exception while get list of items. {ex.Message}");
}
}
}
}