12345678910111213141516171819202122232425262728293031323334353637383940 |
- using Microsoft.AspNetCore.Authorization;
- using Microsoft.AspNetCore.Http;
- using Microsoft.AspNetCore.Mvc;
- using MTWorkHR.Application.Identity;
- using MTWorkHR.Application.Models;
- using MTWorkHR.Application.Services.Interfaces;
- using MTWorkHR.Identity.Services;
- namespace MTWorkHR.API.Controllers
- {
- [Route("api/[controller]")]
- [ApiController]
- public class LookupController : ControllerBase
- {
- private readonly ILookupService _LookupService;
- public LookupController(ILookupService UserLookupService)
- {
- this._LookupService = UserLookupService;
- }
- [HttpGet("GetAllLeaveType")]
- [ProducesResponseType(StatusCodes.Status200OK)]
- public async Task<ActionResult<List<LeaveTypeDto>>> GetAllLeaveType()
- {
- return await _LookupService.GetAllLeaveType();
- }
- [HttpGet("GetAllOrderType")]
- [ProducesResponseType(StatusCodes.Status200OK)]
- public async Task<ActionResult<List<OrderTypeDto>>> GetAllOrderType()
- {
- return await _LookupService.GetAllOrderType();
- }
- }
- }
|