LookupController.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using Microsoft.AspNetCore.Authorization;
  2. using Microsoft.AspNetCore.Http;
  3. using Microsoft.AspNetCore.Mvc;
  4. using MTWorkHR.Application.Identity;
  5. using MTWorkHR.Application.Models;
  6. using MTWorkHR.Application.Services.Interfaces;
  7. using MTWorkHR.Identity.Services;
  8. namespace MTWorkHR.API.Controllers
  9. {
  10. [Route("api/[controller]")]
  11. [ApiController]
  12. public class LookupController : ControllerBase
  13. {
  14. private readonly ILookupService _LookupService;
  15. public LookupController(ILookupService UserLookupService)
  16. {
  17. this._LookupService = UserLookupService;
  18. }
  19. [HttpGet("GetAllLeaveType")]
  20. [ProducesResponseType(StatusCodes.Status200OK)]
  21. public async Task<ActionResult<List<LeaveTypeDto>>> GetAllLeaveType()
  22. {
  23. return await _LookupService.GetAllLeaveType();
  24. }
  25. [HttpGet("GetAllOrderType")]
  26. [ProducesResponseType(StatusCodes.Status200OK)]
  27. public async Task<ActionResult<List<OrderTypeDto>>> GetAllOrderType()
  28. {
  29. return await _LookupService.GetAllOrderType();
  30. }
  31. }
  32. }