public ActionResult <decimal> RequestTransfer(Transfer transfer) { Account someone = accountDAO.GetAccountInfoById(transfer.UserFromId); Account me = accountDAO.GetAccountInfoById(transfer.UserToId); if (someone.AccountId == 0) { return(NotFound()); } return(requestDAO.RequestTransfer(transfer.Amount, someone, me)); }
public ActionResult <decimal> TransferFunds(Transfer transfer) { Account sender = accountDAO.GetAccountInfoById(transfer.UserFromId); Account receiver = accountDAO.GetAccountInfoById(transfer.UserToId); if (receiver.AccountId == 0) { return(NotFound()); } return(transferDAO.MakeTransfer(transfer.Amount, sender, receiver)); }
public Account GetMyAccountBalance() { return(accountDAO.GetAccountInfoById((int)GetCurrentUserId())); }