using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using MTWorkHR.Application.Identity; using MTWorkHR.Application.Models; namespace MTWorkHR.API.Controllers { [Route("api/[controller]")] [ApiController] public class AuthController : ControllerBase { private readonly IAuthService _authenticationService; public AuthController(IAuthService authenticationService) { this._authenticationService = authenticationService; } [HttpPost("login")] public async Task> Login(AuthRequest request) { return Ok( await _authenticationService.Login(request)); } [HttpPost("register")] public async Task> Register(RegistrationRequest request) { return Ok(await _authenticationService.Register(request)); } } }