public async Task <ActionResult <RespostaApi> > AutenticarUsuario([FromBody] AutenticacaoDTO autenticacao, [FromServices] IAutenticarUsuarioUseCase autenticarUsuarioUseCase) { try { return(Ok(await autenticarUsuarioUseCase.Executar(autenticacao.Cpf, autenticacao.Senha, autenticacao.DispositivoId))); } catch (System.Exception ex) { return(BadRequest(ex)); } }
public async Task <ActionResult <RespostaApi> > AutenticarUsuario([FromQuery] string cpf, [FromQuery] string senha, [FromQuery] string dispositivoId, [FromServices] IAutenticarUsuarioUseCase autenticarUsuarioUseCase) { return(Ok(await autenticarUsuarioUseCase.Executar(cpf, senha, dispositivoId))); }