Exemple #1
0
        public IActionResult AddTransaction(Transactions newTransaction)
        {
            RPTransactions rpT = new RPTransactions();
            var            res = rpT.CheckMoney(newTransaction.Type);

            if (res == true)
            {
                rpT.AddNewTransaction(newTransaction);
            }
            else
            {
                var nf = NotFound("Error");
                return(nf);
            }
            return(CreatedAtAction(nameof(AddTransaction), newTransaction));
        }
Exemple #2
0
        public IActionResult Get()
        {
            RPTransactions rpT = new RPTransactions();

            return(Ok(rpT.getTranHistory()));
        }