public async Task <IActionResult> Get(int accountId, int?periodId)
        {
            try{
                DebtHistory[] DebtHistoryModel = await _repo.GetDebtHistory(accountId, periodId);

                // match date to dto
                DebtHistoryDto[] result = _mapper.Map <DebtHistoryDto[]>(DebtHistoryModel);
                return(Ok(result));
            }
            catch (System.Exception ex)
            {
                return(this.StatusCode(StatusCodes.Status500InternalServerError, $"Banco dados falhou {ex.Message}"));
            }
        }