Beispiel #1
0
        public async ValueTask <ActionResult <List <TransactionOutputModel> > > GetTransactionsByAccountId(long accountId)
        {
            DataWrapper <int> dataWrapper = await _repo.AccountFindById(accountId);

            if (dataWrapper.Data == 0)
            {
                return(BadRequest("The account is not found or was deleted"));
            }
            var restRequest = new RestRequest($"transaction/by-account-id/{accountId}", Method.GET, DataFormat.Json);
            var result      = await _restClient.ExecuteAsync <List <TransactionOutputModel> >(restRequest);

            return(MakeResponse(result));
        }