Created
March 3, 2021 23:23
-
-
Save basyusuf/f67b208b0221fd62f6dd77b724b4e773 to your computer and use it in GitHub Desktop.
Business Logic Bank Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let transferAmount = body.amount; | |
let currentBalance = user.getBalance(); | |
if (transferAmount <= currentBalance) { | |
// Complete the transfer | |
} else { | |
// Unsuccessful transfer. Blocked | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment