123456789101112131415161718192021222324252627282930 |
- using Microsoft.AspNetCore.Http;
- using Microsoft.AspNetCore.Identity;
- using Microsoft.AspNetCore.Mvc;
- using MTWorkHR.Application.Filters;
- using MTWorkHR.Application.Identity;
- using MTWorkHR.Application.Models;
- using MTWorkHR.Core.Global;
- using MTWorkHR.Identity.Services;
- namespace MTWorkHR.API.Controllers
- {
- [Route("api/[controller]")]
- [ApiController]
- public class AdminController : ControllerBase
- {
- private readonly IAuthService _authenticationService;
- public AdminController(IAuthService authenticationService)
- {
- _authenticationService = authenticationService;
- }
- [HttpPost("login")]
- public async Task<ActionResult<AuthResponse>> Login(AuthRequest request)
- {
- return Ok( await _authenticationService.AdminLogin(request));
- }
-
- }
- }
|