LogController.cs 929 B

123456789101112131415161718192021222324252627282930313233
  1. using Microsoft.AspNetCore.Authorization;
  2. using Microsoft.AspNetCore.Http;
  3. using Microsoft.AspNetCore.Mvc;
  4. using MTWorkHR.Application.Filters;
  5. using MTWorkHR.Application.Identity;
  6. using MTWorkHR.Application.Models;
  7. using MTWorkHR.Application.Services;
  8. using MTWorkHR.Application.Services.Interfaces;
  9. using MTWorkHR.Core.Entities;
  10. namespace MTWorkHR.API.Controllers
  11. {
  12. [Route("api/[controller]")]
  13. [ApiController]
  14. //[AppAuthorize]
  15. public class LogController : ControllerBase
  16. {
  17. private readonly ILogService<UserLog> _logService;
  18. public LogController(ILogService<UserLog> CompanyService)
  19. {
  20. this._logService = CompanyService;
  21. }
  22. [HttpGet("GetAll")]
  23. public async Task<ActionResult<List<UserLog>>> GetAll([FromQuery] PagingInputDto pagingInput)
  24. {
  25. return Ok( await _logService.GetAll(pagingInput));
  26. }
  27. }
  28. }