Ejemplo n.º 1
0
        public IActionResult EditQuantity(int?id, string quantity)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var crypto = _walletRepository.GetWalletByRank(id);

            if (crypto == null)
            {
                return(NotFound());
            }

            crypto.Quantity = quantity;
            crypto          = _walletOperationsService.CalculateSum(crypto);
            _walletRepository.UpdateAsync(crypto);
            return(Ok(crypto));
        }