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)); }
public IActionResult Get() { RPTransactions rpT = new RPTransactions(); return(Ok(rpT.getTranHistory())); }