public async Task <IActionResult> FindFirstApprover([Required] string applicantId, int leaderMaxLevel) { try { var personDO = _personApplicationService.FindFirstApprover(applicantId, leaderMaxLevel); var personVO = Mapper.Map <PersonVO>(personDO); return(Ok(new { data = personVO })); } catch (Exception ex) { _logger.LogError(ex, "Find 1st Approver Error!"); return(BadRequest(new { message = ErrorMessage })); } }
public IActionResult FindFirstApprover(string applicantId, int leaderMaxLevel) { var person = _personApplicationService.FindFirstApprover(applicantId, leaderMaxLevel); return(Ok(PersonAssembler.ToDTO(person))); }