Exemple #1
0
        public async Task <IActionResult> SendTransferConfirmAsync([FromRoute] string id)
        {
            if (string.IsNullOrWhiteSpace(id))
            {
                return(ValidationProblem(
                           new ValidationProblemDetails(
                               new Dictionary <string, string[]>
                {
                    { nameof(id), new [] { $"{nameof(id)} is required" } }
                })));
            }

            try
            {
                await _transactionsManager.SendTransferConfirmAsync(id);
            }
            catch (NullReferenceException)
            {
                return(NotFound());
            }

            var transaction = await _transactionsManager.GetAsync(id);

            return(Ok(_mapper.Map <TransactionDetailsModel>(transaction)));
        }